Joel Wilson
01/13/2023, 9:33 PMnatemccurdy
01/13/2023, 9:34 PMmodulepath is when Puppet is running.
The bsemodulepath setting tells Puppet where the global modules are: https://www.puppet.com/docs/puppet/7/configuration.html#basemodulepath
The modulepath setting tells Puppet the complete order of where to look for modules when compiling a catalog. First module found in the path wins.
And the standard value for modulepath (standard by convention) is site-modules:modules:$basemodulepath, which means that environment-specific modules win over global modules.
See https://github.com/puppetlabs/control-repo/blob/production/environment.conf#L1natemccurdy
01/13/2023, 9:34 PMmodulepath is when Puppet is running.
The bsemodulepath setting tells Puppet where the global modules are: https://www.puppet.com/docs/puppet/7/configuration.html#basemodulepath
The modulepath setting tells Puppet the complete order of where to look for modules when compiling a catalog. First module found in the path wins.
And the standard setting for that (standard by convention) is site-modules:modules:$basemodulepath, which means that environment-specific modules win over global modules.
See https://github.com/puppetlabs/control-repo/blob/production/environment.conf#L1natemccurdy
01/13/2023, 9:36 PMsudo puppet apply control-repo/manifests/site.pp --modulepath '$basemodulepath:control-repo/site-modules:control-repo/modules'Joel Wilson
01/13/2023, 9:37 PMnatemccurdy
01/13/2023, 9:37 PMmodulepath is when Puppet is running.
The bsemodulepath setting tells Puppet where the global modules are: https://www.puppet.com/docs/puppet/7/configuration.html#basemodulepath
The modulepath setting tells Puppet the complete order of where to look for modules when compiling a catalog. First module found in the path wins.
And the standard value for modulepath (standard by convention) is site-modules:modules:$basemodulepath, which means that environment-specific modules win over global modules.
See https://github.com/puppetlabs/control-repo/blob/production/environment.conf#L1Lumiere
01/13/2023, 10:19 PMLumiere
01/13/2023, 10:19 PMLumiere
01/13/2023, 10:20 PMSlackbot
01/13/2023, 10:43 PMnatemccurdy
01/13/2023, 10:47 PMnotice("server_facts is: ${server_facts}")
notice("servername is: ${servername}")
With this change, it's got all the info I'd expect:
~/src/puppetlabs/puppet [add_all_server_facts_to_apply]$ be puppet apply ~/foo.pp
Notice: Scope(Class[main]): server_facts is: {serverversion => 6.29.0, servername => laptop.local, serverip => 10.0.0.17, serverip6 => fe80::178d:e46:e111:c327, environment => production}
Notice: Scope(Class[main]): servername is: laptop.local
Notice: Compiled catalog for adot.local in environment production in 0.01 seconds
Notice: Applied catalog in 0.01 seconds
Without this change, server_facts only has `environment`:
~/src/puppetlabs/puppet [add_all_server_facts_to_apply ]$ puppet apply ~/foo.pp
Notice: Scope(Class[main]): server_facts is: {environment => production}
Warning: Unknown variable: 'servername'. (file: /Users/nate/foo.pp, line: 2, column: 26)
Notice: Scope(Class[main]): servername is:
Notice: Compiled catalog for laptop.local in environment production in 0.02 seconds
Notice: Applied catalog in 0.01 secondsAnimesh Sahu
01/14/2023, 10:07 AMSlackbot
01/14/2023, 1:43 PMtragiccode
01/14/2023, 1:43 PMString but of type Sensitive[String] ( https://github.com/TraGicCode/tragiccode-azure_key_vault/blob/c158fe763716a1d873ad[…]23a60bdfcf1e52f8/lib/puppet/functions/azure_key_vault/lookup.rb ).
------------------------------------------------------------------------
When the user does a lookup in their puppet file like this, it works perfectly fine.
$password = lookup('my-secret')
file { 'C:\\Source\\tragiccode\\puppet-playground\\azure-key-vault-test.txt':
ensure => file,
content => $password,
}
------------------------------------------------------------------------
When the user does a lookup call inside their common.yaml file it doesn't work. code shown below
Common.yaml
profile::akv::sensitive_admin_password: "%{lookup('my-secret')}"
site.pp
class profile::akv (
Sensitive[String] $sensitive_admin_password,
) {
file { 'C:\\Source\\tragiccode\\puppet-playground\\azure-key-vault-test.txt':
ensure => file,
content => $sensitive_admin_password.unwrap,
}
}
include profile::akv
This is what ends up in the azure-key-vault-test.txt file which looks like someone did a ToString on a value wrapped on a Sensitive type.
Does anyone know how to fix this or if i must change my puppet function to not return a Sensitive[String] in order for this to work?tragiccode
01/14/2023, 1:43 PMString but of type Sensitive[String] ( https://github.com/TraGicCode/tragiccode-azure_key_vault/blob/c158fe763716a1d873ad[…]23a60bdfcf1e52f8/lib/puppet/functions/azure_key_vault/lookup.rb ).
------------------------------------------------------------------------
When the user does a lookup in their puppet file like this, it works perfectly fine.
$password = lookup('my-secret')
file { 'C:\\Source\\tragiccode\\puppet-playground\\azure-key-vault-test.txt':
ensure => file,
content => $password,
}
------------------------------------------------------------------------
When the user does a lookup call inside their common.yaml file it doesn't work. code shown below
Common.yaml
profile::akv::sensitive_admin_password: "%{lookup('my-secret')}"
site.pp
class profile::akv (
Sensitive[String] $sensitive_admin_password,
) {
file { 'C:\\Source\\tragiccode\\puppet-playground\\azure-key-vault-test.txt':
ensure => file,
content => $sensitive_admin_password,
}
}
include profile::akv
This is what ends up in the azure-key-vault-test.txt file which looks like someone did a ToString on a value wrapped on a Sensitive type.
Does anyone know how to fix this or if i must change my puppet function to not return a Sensitive[String] in order for this to work?tragiccode
01/14/2023, 1:49 PMString but of type Sensitive[String] ( https://github.com/TraGicCode/tragiccode-azure_key_vault/blob/c158fe763716a1d873ad[…]23a60bdfcf1e52f8/lib/puppet/functions/azure_key_vault/lookup.rb ).
------------------------------------------------------------------------
When the user does a lookup in their puppet file like this, it works perfectly fine.
$password = lookup('my-secret')
file { 'C:\\Source\\tragiccode\\puppet-playground\\azure-key-vault-test.txt':
ensure => file,
content => $password,
}
------------------------------------------------------------------------
When the user does a lookup call inside their common.yaml file it doesn't work. code shown below
Common.yaml
profile::akv::sensitive_admin_password: "%{lookup('my-secret')}"
site.pp
class profile::akv (
Sensitive[String] $sensitive_admin_password,
) {
file { 'C:\\Source\\tragiccode\\puppet-playground\\azure-key-vault-test.txt':
ensure => file,
content => $sensitive_admin_password,
}
}
include profile::akv
This is what ends up in the azure-key-vault-test.txt file which looks like someone did a ToString on a value wrapped on a Sensitive type.
azure-key-vault-test.txt
Sensitive [value redacted]
Does anyone know how to fix this or if i must change my puppet function to not return a Sensitive[String] in order for this to work?Slackbot
01/14/2023, 3:14 PMcruelsmith
01/14/2023, 3:27 PMensure. For your case you will properly want installed to just ensure via puppet that the package in installed but not be raised the version when a new package is available.
https://www.puppet.com/docs/puppet/7/types/package.html#package-attribute-ensurecruelsmith
01/14/2023, 3:35 PMensure. For your case you will properly want installed to just ensure via puppet that the package in installed but not be raised or lower the version when a new package is available.
https://www.puppet.com/docs/puppet/7/types/package.html#package-attribute-ensureromgo
01/14/2023, 8:51 PM'dotnet-runtime':
ensure : '6.0.11'
provider : 'chocolatey'romgo
01/14/2023, 8:51 PMwindows::package:'dotnet-runtime':
ensure : '6.0.11'
provider : 'chocolatey'romgo
01/14/2023, 8:51 PMwindows::package:
'dotnet-runtime':
ensure : '6.0.11'
provider : 'chocolatey'romgo
01/14/2023, 8:52 PMwindows::package:
'dotnet-runtime':
ensure : '6.0.11'
provider : 'chocolatey'
But I just check the cholotaye repository. I'm pretty sure that if I only use present chocolatey will install latest version of the package available - which is dotnet 7.Slackbot
01/14/2023, 8:55 PMJoe
01/14/2023, 8:55 PMawait page.mouse.move(bounding.x + (bounding.width/2), bounding.y + (bounding.height/2), {"steps": getRandomInt(50,200)})Joe
01/14/2023, 8:55 PMJoe
01/14/2023, 8:56 PMJoe
01/14/2023, 8:56 PMtragiccode
01/14/2023, 11:03 PMtragiccode
01/14/2023, 11:03 PM