If you don't want to read the file, you can try reading the catalog object
in the 'flush' method of the provider.

Trevor


On Mon, Jun 24, 2013 at 11:27 AM, Luke Kanies <[email protected]> wrote:

> This should be a reasonable way, and you should be able to hack up the
> Report processor a bit, too.  You can be guaranteed that that will run
> after the whole thing is completed, which is important, I think.
>
> On Jun 24, 2013, at 6:37 AM, Erik Dalén <[email protected]>
> wrote:
>
> There might be better ways than this, but anyway the 'classfile'
> (Puppet.settings[:classfile]) is saved before the catalog application
> starts after the agent has received a catalog. So that could be inspected
> to determine the classes on the node.
>
>
> On 24 June 2013 15:21, Klaus Ethgen <[email protected]> wrote:
>
>> Hello folks,
>>
>> I am implementing a custom type that is doing some auditing stuff at the
>> end of the puppet run. For this I need the applied classes to cross
>> check if it is used or not. Unfortunately I did not find proper
>> information about this. I could use inline_template("<%= classes.inspect
>> %>") inside of a manifest to get this informaton but how do I do this in
>> a provider that is running (and has to) on the client?
>>
>> I tried:
>>    Puppet::Resource::Catalog.indirection.find(Facter[:fqdn].value).classes
>>
>> ... but it worked only when using with puppet apply. As I understand,
>> this is also initializing a query to the server. However, there must be
>> any better way to get the classes that are applied with the current
>> puppet run.
>>
>> -- Klaus
>> --
>> Klaus Ethgen                              http://www.ethgen.ch/
>> pub  4096R/4E20AF1C 2011-05-16   Klaus Ethgen <[email protected]>
>> Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/puppet-dev.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
> --
> Erik Dalén
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/puppet-dev.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
>
>
> --
> Luke Kanies | http://about.me/lak | http://puppetlabs.com/ |
> +1-615-594-8199
> Join us at PuppetConf 2013, August 22-23 in San Francisco -
> http://bit.ly/pupconf13
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/puppet-dev.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
[email protected]

-- This account not approved for unencrypted proprietary information --

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-dev.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to