On Oct 18, 5:19 am, Daniel Maher <d...@witbe.net> wrote:
> I am curious to know what is the best practice for removing a module
> (and the resources it maintains) from a system ?

[...]

> I have occasionally written sub-modules to do the work of cleaning the
> resources away (ex. « webservice::no »), but this seems ridiculous, and
> is an administrative pain besides.  What sorts of approaches might there
> be to make this for manageable ?

I'm guessing you mean you have written sub-*classes* to do that job.
That is indeed the Puppet way to do it, and I don't find it at all
ridiculous.

Perhaps you already understand this, but you do not grok Puppet until
you know in your bones that Puppet is about achieving and maintaining
*state*, and only incidentally about doing particular work.  In this
case, the state detail you achieve _and maintain_ is that the web
service is not installed.  If it is important to you that the service
be absent from certain nodes, then why is it ridiculous for Puppet to
maintain that?

If you find it more palatable, you can create a custom fact that
reports whether the service is installed, and conditionally include
the "webservice::no" class based on its value.

As a practical matter, an advantage of the subclass approach is that,
if done right, including both the base class and the ::no class works,
and results in the web service being absent (as if just the ::no class
were included).  That means you don't have to worry about finding and
changing all the places in a complex configuration that the base class
may be included.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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