Brian Schonecker
08/04/2022, 6:19 PMcsharpsteen
08/04/2022, 6:22 PMclass { '...': }
is mostly for when you need to make sure a specific set of parameters are used.JaredGS
08/04/2022, 6:27 PMlookup_key
hieradata function, referencing a function at the top-level of my puppet control repo (environment function not in any specific module), and I’m getting this error when I run `puppet apply`:
Error: Unable to find 'lookup_key' function named 'host_search' (file: /path/to/control-repo/hiera.yaml) on ...
the custom function itself it located in
/path/to/control-repo/function/host_search.pp
any idea on what I’m doing wrong?JaredGS
08/04/2022, 6:31 PMlookup_key
hieradata function, referencing a function at the top-level of my puppet control repo (environment function not in any specific module), and I’m getting this error when I run `puppet apply`:
Error: Unable to find 'lookup_key' function named 'host_search' (file: /path/to/control-repo/hiera.yaml) on ...
the custom function itself it located in
/path/to/control-repo/function/host_search.pp
any idea on what I’m doing wrong?vchepkov
08/04/2022, 6:38 PMvchepkov
08/04/2022, 6:41 PMsite/mylookup
and adjust environment.conf to include site in modulepathvchepkov
08/04/2022, 6:42 PM$ cat environment.conf
modulepath = modules:site:$basemodulepath
Slackbot
08/04/2022, 6:42 PMLes Shiner
08/04/2022, 6:43 PMpuppet:///modules//test_pilot_groups//files//*
Les Shiner
08/04/2022, 6:43 PMvchepkov
08/04/2022, 6:43 PMLes Shiner
08/04/2022, 6:44 PMclass test_pilot_groups::pilot_groups {
package { 'C:/test_pilot_groups/':
ensure => directory,
source => 'puppet:///modules//test_pilot_groups//files//',
}
}
Les Shiner
08/04/2022, 6:44 PMnatemccurdy
08/04/2022, 6:46 PMfile { 'C:/test_pilot_groups/':
ensure => directory,
recurse => true,
purge => true, # This is optional, but usually used.
force => true,
source => 'puppet:///modules/test_pilot_groups',
}
Recursive file copies look like this ☝️
But also, it’s a best practice to not recursively copy more than just a few text files.
If you’re copying dozens or hundreds of files, or if those files are binary and/or large, you definitely don’t want to use a recurisve copy as it can dramatically affect performance.natemccurdy
08/04/2022, 6:46 PMfile { 'C:/test_pilot_groups/':
ensure => directory,
recurse => true,
purge => true,
force => true,
source => 'puppet:///modules/test_pilot_groups',
}
Recursive file copies look like this ☝️
But also, it’s a best practice to not recursively copy more than just a few text files.
If you’re copying dozens or hundreds of files, or if those files are binary and/or large, you definitely don’t want to use a recurisve copy as it can dramatically affect performance.natemccurdy
08/04/2022, 6:46 PMfile { 'C:/test_pilot_groups/':
ensure => directory,
recurse => true,
purge => true, # This is optional, but usually used.
force => true,
source => 'puppet:///modules/test_pilot_groups',
}
Recursive file copies look like this ☝️
But also, it’s a best practice to not recursively copy more than just a few text files.
If you’re copying dozens or hundreds of files, or if those files are binary and/or large, you definitely don’t want to use a recurisve copy as it can dramatically affect performance.Les Shiner
08/04/2022, 6:46 PMnatemccurdy
08/04/2022, 6:48 PMpuppet/archive
module, etc…Les Shiner
08/04/2022, 6:48 PMnatemccurdy
08/04/2022, 6:48 PMLes Shiner
08/04/2022, 6:48 PMbastelfreak
08/04/2022, 6:48 PMSlackbot
08/04/2022, 8:48 PMkenyon
08/04/2022, 9:01 PMJoost
08/04/2022, 9:02 PMPatrick Rynhart
08/04/2022, 9:45 PMPatrick Rynhart
08/04/2022, 9:46 PMPatrick Rynhart
08/04/2022, 9:46 PM$muc = $config['muc']
notify{ "The dumped variable is $muc": }
Patrick Rynhart
08/04/2022, 9:46 PMPatrick Rynhart
08/04/2022, 9:46 PMNotice: /Stage[main]/Profile::Stream_web/Notify[The dumped variable is {developmentb => {someattribute => here, anotherattribute => here}, developmentc => {someattribute => here, anotherattribute => here}}]/message: defined 'message' as 'The dumped variable is {developmentb => {someattribute => here, anotherattribute => here}, developmentc => {someattribute => here, anotherattribute => here}}'