On 09/25/2014 07:11 AM, Frederik Wagner wrote:
> 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
>
Hi Frederik,
I think that puppetdbquery[1] can do what you're looking for.
Take a look a it,
[1] https://forge.puppetlabs.com/dalen/puppetdbquery
--
Yanis Guenane
--
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/5424DE88.80205%40gmail.com.
For more options, visit https://groups.google.com/d/optout.