Slackbot
05/23/2023, 10:37 PMSlackbot
05/24/2023, 12:49 PMSlackbot
05/24/2023, 12:56 PMSlackbot
05/24/2023, 1:17 PMSlackbot
05/24/2023, 1:46 PMCarlos Laviola
05/24/2023, 1:53 PMif $elligible_hosts.any |$host| { $facts[networking][fqdn] == $host } {
$activate_ensure = file
} else {
$activate_ensure = absent
}
In this case it's to determine whether I want to materialise a particular file on a node or not.
(I also tried a ternary operator in a selector, but at the time I was just trying to implicitly do the equivalent of any
between my variable and the fact. maybe I can also do it using the lambda or member()
, but I admit I haven't tried.)Slackbot
05/24/2023, 1:55 PMSlackbot
05/24/2023, 1:56 PMbastelfreak
05/24/2023, 1:58 PMif $facts['networking']['fqdn'] in $elligible_hosts {
$activate_ensure = file
} else {
$activate_ensure = absent
}
like that?Slackbot
05/24/2023, 1:59 PMbastelfreak
05/24/2023, 1:59 PMSlackbot
05/24/2023, 1:59 PMSlackbot
05/24/2023, 5:45 PMSlackbot
05/24/2023, 8:10 PMbrokencode
05/24/2023, 8:12 PMStephen
05/24/2023, 10:40 PMStephen
05/24/2023, 10:41 PMnatemccurdy
05/24/2023, 11:33 PMStephen
05/25/2023, 12:14 AMBalram thakur
05/25/2023, 2:25 AMSlackbot
05/25/2023, 6:31 AMSlackbot
05/25/2023, 10:05 AMSlackbot
05/25/2023, 4:50 PMDr Bunsen Honeydew
05/25/2023, 5:45 PMSlackbot
05/26/2023, 8:23 AMbastelfreak
05/26/2023, 12:14 PMemerson_prado
05/26/2023, 5:49 PMbundle exec pdk validate --puppet-version=<Version>
on a module I'm working on, to make sure I don't break its current Puppet compatibility. How do I check which versions are available, and install needed ones? I tried gem list puppet
, then gem install puppet -v <Version>
, but it still returns Unable to find a Puppet gem matching ~> <Version>
.emerson_prado
05/26/2023, 6:01 PMgem list ^puppet$
puppet (7.24.0, 7.23.0)
sudo gem install puppet -v 4.7.0
sudo gem install puppet -v 5.5.8
sudo gem install puppet -v 5.5.22
Done installing documentation for puppet after 11 seconds
gem list ^puppet$
puppet (7.24.0, 7.23.0, 5.5.22, 5.5.8, 4.7.0)
Then:
pdk validate --puppet-version=4.7.0
`pdk (WARN): This module is compatible with an older version of PDK. Run pdk update
to update it to your version of PDK.`
pdk (ERROR): Unable to find a Puppet gem matching ~> 4.7.0.
pdk validate --puppet-version=5.5.8
`pdk (WARN): This module is compatible with an older version of PDK. Run pdk update
to update it to your version of PDK.`
pdk (ERROR): Unable to find a Puppet gem matching ~> 5.5.0.
pdk validate --puppet-version=5.5.22
`pdk (WARN): This module is compatible with an older version of PDK. Run pdk update
to update it to your version of PDK.`
pdk (ERROR): Unable to find a Puppet gem matching ~> 5.5.0.
bastelfreak
05/26/2023, 6:19 PMbastelfreak
05/26/2023, 6:19 PM