Score:0

puppet: collect an exported resource matching certname?

br flag

Is it possible to collect resources which match a certname?

E.g.

@@notify{"get this with certname compared to a variable" : }
Notify <<| certname == $::fqdn |>>

@@notify{"get this with certname matching string" :   }
Notify <<| certname == "f.q.d.n" |>>

@@notify{"get this with tag, to prove collection is sometimes working" : tag => $::fqdn }
Notify <<| tag == $::fqdn |>>

Output:

Notice: get this with tag, to prove collection is sometimes working
Notice: /Stage[main]/Defaultcls/Notify[get this with tag, to prove collection is sometimes working]/message: defined 'message' as 'get this with tag, to prove collection is sometimes working'
Notice: Applied catalog in 27.13 seconds

If this is not possible, any workarounds? (One workaround is to tag the resource of interest, but that is error prone b/c one might forget.)

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.