Hey Daniel,
Thanks for the reply and hints about "defined".
I ended up putting the puppetdb code into a function and calling the
function:
$ cat modules/util/functions/does_host_have_class.pp
function util::does_host_have_class(
String $class
) >> Boolean {
$func_name = "util::does_host
Hi,
no answer yet? Or did miss them? I'm not a puppet professional but i may
provide some other approaches and an opinion.
There is the function defined()
https://puppet.com/docs/puppet/7/function.html#defined , but it's tricky
because you need to be 100% sure that in your example class fail2ban
Greetings,
I have a puppetdb installation that I leverage by querying from my
manifests.
I'd like to have a boolean-like operation for puppetdb that pretty much
tests if the current node has a given class as part of the catalog. Here is
my current code:
$query = [
'resour