On Thu, Jul 7, 2011 at 2:10 PM, Keith Minkler <kmink...@gmail.com> wrote:

> Thanks Luke,
>
> > This use case comes up a lot. There are some functions but
> > historically they have not been reliable due to Puppet's random parse
> > order for resources and classes.
>
> This is the trouble I had with the defined() function, so I had given
> up on it, since it was not returning in a reliable way.
>


Tagged() tends to be more reliable but less complete. (And I think it
requires an external node classifier..?)

If the machine has 'webserver' in the yaml from the ENC, and webserver
includes apache, then in theory defined will be true for both apache and
webserver. Tagged will only be true for webserver, but thats often enough
(at least in our setup, although it is still something I am trying to get
rid of..) And it should be true every time, regardless of parsing order.

Also, you can include classes/tags in the yaml that don't exist without
causing any issues. (For example, we use a 'nomonitor' class to bypass all
the icinga modules cleanly..)

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to