Is there an way to get the top level classes included in a puppet node?
Posted
by
pwan
on Server Fault
See other posts from Server Fault
or by pwan
Published on 2012-07-05T20:40:31Z
Indexed on
2012/07/05
21:18 UTC
Read the original article
Hit count: 278
puppet
Is there an easy way to return the top level classes applied to a node. By this I mean the classes included in a node definition or ENC equivalent For example with the sample node below, I'd like to return 'return::me' and 'return::me2' for somehost, but not 'dontreturn::me'
class return::me {
include dontreturn::me
}
node "somehost" {
include return::me
include return::me2
}
I see that /var/lib/puppet/state/classes.txt includes the full list of classes applied to the node, but that includes any additional classes included by to the top level classes.
Is there some way to get at this data with a puppet faces command ? I suspect 'puppet nodes' might be useful, but I haven't been able to get it return what I what.
© Server Fault or respective owner