Hello. I'm fumbling with puppetlabs/stdlib's membe...
# forge-modules
l
Hello. I'm fumbling with puppetlabs/stdlib's member function. I want to execute code based on whether a node's domain is part of an array of domains. So we have:
Optional[Array[Stdlib::Fqdn]] $domainlist = undef,
(which I have defined as a list of domain name strings for the entire environment in hiera) ...and then I'd like to do:
if member($module::domainlist, $facts['networking']['domain']) { echo { 'some_output': ... } }
The "echo" is never visible in the agent output, other echoes do work. Where's the mistake?
OK I have to withdraw that question. During branch merges, a conditional inclusion of the whole surrounding class was eliminated reintroduced. The code was never executed. Sorry for the fuss. For the record, I have turned towards
if $facts['networking']['domain'] in $module::domainlist
. And it works.