Hi Yanis,

thanks for the hint. Sounds reasonable - I'll check it out!

Bye
Frederik

On Fri, Sep 26, 2014 at 5:33 AM, Yanis Guenane <[email protected]> wrote:
>
>
> 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.

-- 
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/CACBNCo%3Dypk%3DTXVUPsf8-NU5WEm9BNFm_u0dX%3DU%3DLrZttmCGQiA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to