In my old Puppet+Hiera install, there was a variable 'ilom' defined for
some nodes in my estate, but not all. I used to handle it like this:
$ilom = hiera('ilom', undef)
if ($ilom) {
$ilomnotes = "iLOM address: ${ilom}"
} else {
$ilomnotes = undef
}
@@nagios_host { $::fqdn:
...
notes => $ilomnotes,
...
}
The new lookup() function doesn't work in the same way. What's the
recommended way of referencing a variable that may or may not exist?
I'm still getting used to new Hiera as I'm building my replacement
server and I've got a lot of legacy baggage :(
Thanks,
Jonathan
--
Jonathan Gazeley
Senior Systems Administrator
IT Services
University of Bristol
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/07ed6cb6-a217-106c-9548-a7b6bbc01f3d%40bristol.ac.uk.
For more options, visit https://groups.google.com/d/optout.