Frederik Wagner
unread,Sep 25, 2014, 7:11:26 AM9/25/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
Hi group,
is there a way to count the number of resources of a specific type
(with a specific tag) included in the catalog?
In more detail:
In a manifest I collect external resources like:
External::Resource <<| tag == 'tagged_resource' |>>
Now I would like to know how many resources are actually collected, so
I would like to have/write a function
$num_res = count_resources( External::Resource, { 'tag' =>
'tagged_resource' } )
to be used in the rest of the manifest.
Is there a way to realize this in a custom function? I suppose there
is, but I'm missing the right API calls.
Thanks a lot for any hints in the right direction.
Bye
Frederik