natemccurdy
10/26/2022, 10:56 PMclass profile::base {
case $facts['os']['family'] {
'RedHat', 'Debian' : { include profile::base::linux }
'Windows': { include profile::base::windows }
default: { }
}
}
And to declare the profile::base class on all nodes, you could either explicitly add include profile::base to reach role class, or put include profile::base outside of a node definition or within the default node definition in site.ppramindk
10/26/2022, 11:00 PMprofile::std rather than profile::base. I've found it's clearer to consumers in that you're applying a standard set of packages, etc rather than applying a base which is usually viewed as less intrusive. ymmv.
Bonus content, something like this is common IME.
class profile::std {
include "profile::$facts[os.family].downcase" # or whatever worksWilliam Myers
10/26/2022, 11:05 PMWilliam Myers
10/26/2022, 11:08 PMnatemccurdy
10/26/2022, 11:09 PMWilliam Myers
10/26/2022, 11:09 PMWilliam Myers
10/26/2022, 11:46 PMclass account_svcansiblelocal (
String $user_passwordWilliam Myers
10/26/2022, 11:47 PMaccount_svcansiblelocal::user_sshkeys:
- '(somekey1)'
- '(Somekey2)'William Myers
10/26/2022, 11:47 PMaccount_svcansiblelocal::user_sshkeys:
- '(somekey1)'
- '(Somekey2)'glee
10/26/2022, 11:47 PMglee
10/26/2022, 11:49 PMWilliam Myers
10/26/2022, 11:49 PMWilliam Myers
10/26/2022, 11:51 PMglee
10/26/2022, 11:53 PMWilliam Myers
10/26/2022, 11:53 PMclass account_svcansiblelocal (
String $user_password
Array[String] $user_sshkeys
) {William Myers
10/26/2022, 11:54 PMWilliam Myers
10/26/2022, 11:54 PMglee
10/26/2022, 11:55 PMclass account_svcansiblelocal (
String $user_password,
Array[String] $user_sshkeys,
) {Tamas Papp
10/27/2022, 3:58 AMSlackbot
10/27/2022, 3:59 AMTamas Papp
10/27/2022, 4:00 AM$file = '/dev/ipmi0'
exec { "check_${file}_exist":
command => '/bin/true',
onlyif => "/usr/bin/test -e ${file}",
}
package { [ 'ipmitool','freeipmi-tools' ]:
ensure => latest,
require => Exec["check_${file}_exist"],
}Tamas Papp
10/27/2022, 4:00 AM$file = '/dev/ipmi0'
exec { "check_${file}_exist":
command => '/bin/true',
onlyif => "/usr/bin/test -e ${file}",
}
package { [ 'ipmitool','freeipmi-tools' ]:
ensure => latest,
require => Exec["check_${file}_exist"],
}
And this is the related debug output:
Debug: Exec[check_/dev/ipmi0_exist](provider=posix): Executing check '/usr/bin/test -e /dev/ipmi0'
Debug: Executing: '/usr/bin/test -e /dev/ipmi0'
Debug: /Stage[main]/Pts_ipmi/Exec[check_/dev/ipmi0_exist]: '/bin/true' won't be executed because of failed check 'onlyif'
Debug: Executing: '/usr/bin/apt-cache policy ipmitool'sameer
10/27/2022, 7:42 AMSlackbot
10/27/2022, 7:48 AMSlackbot
10/27/2022, 10:31 AMfe80
10/27/2022, 11:37 AMRobert FD
10/27/2022, 11:43 AMpuppetlabs-mysql module's switch to mariaDB when you have an existing installation of mysql? I reported the issue that I am experiencing here.Dr Bunsen Honeydew
10/27/2022, 11:43 AMpuppetlabs-mysql module at https://forge.puppet.com/puppetlabs/mysql?src=slack&channel=puppetRobert FD
10/27/2022, 11:43 AMpuppetlabs-mysql module's switch to mariaDB when you have an existing installation of mysql? I reported the issue that I am experiencing here.Slackbot
10/27/2022, 12:09 PM