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.
