Hi,

I don't know if I'm just not getting it, but I'm struggling to find
"the" way to elegantly disable a class in its entirety. I am aware of
the foo::disabled conventions, but these are about the disabling of
the end service defined by the class, not the class itself. I'm
looking to have an most encompassing default node class and by
exception provide overrides by ENC's with dashboard. Whilst I'm fine
with the concept of adding a class to a node in dashboard to use, for
example, sshd::disabled, but what if I want to just remove all trace
of the class, so a very simple example is a class I've written to
manage /etc/hosts. So it just sticks a templated file there, nothing
worth pasting, but how do I, by exception, ignore the file totally?

I've seen a few interesting things using variables in the class name
(e.g. "include foo::$operatingsystem") (from here -
http://m0dlx.com/blog/Puppet_manifests__a_multi_OS_style_guide.html )
and I can see how that variable (not that one obviously, but something
new) could be used to include an empty class instead, but this feels
hacky for the way I would think I could use it here - not least
because I'd have to call "include foo::enable" or such like for every
module, which can't be good style. My initial thought would be to put
a conditional to bypass a resource, but again assume that's pretty
ugly too.

So again, I just want to wipe out the impact of the class, unmanage as
it were, replace the contents with a nice simple { } regardless of
what it was written to do maybe, not force disabling of the end
result, and I'm assuming there is a great and painfully simple way to
do this with style, but it's missing me right now.

Thanks

Chris

-- 
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