Ask Your Question

Does Class need a special care for its removal

asked 2013-12-30 08:30:18 -0600

jaksky gravatar image

Hi, my question might be probably simple one but I haven't found the answer in the tutorial, documentation, forum and I would rather be clear than surprised latter.

Do I need some special care in custom classes in order the removal work properly? To be clear I have developed some classes which are composition of standard puppet resources and those classes are defined via include keyword. I make use of profile-role pattern. My question is actually how I remove this classes from the machine where they have already been installed from the previous run of manifest. On the standard ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-04-19 19:03:35 -0600

solarkennedy gravatar image

There is not an "opposite" of include. If you need to remove a class from, you must have a parameter to that class to take care of this.

This is kinda hard, and many modules do not have options for this.

The example42 modules do often have a parameter for ensuring absent, see

So to take advantage of this, your developed classes must also have a parameter for ensuring absent, and when set, remove the resources that it installed.

This is one of the reasons that immutable servers / baked images are so popular, the eliminate the possibility of cruft being leftover and make this particular problem a non-issue.

So in conclusion, no, there is no magic to ensure resources are removed from a special class. It is up to the author to have a parameter to remove itself, and it is up to you to set that parameter when you need it removed. Otherwise simply "commenting out" the class leaves all resources left intact. (unless purge=>true in some cases)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-12-30 08:30:18 -0600

Seen: 187 times

Last updated: Apr 19 '14