Ask Your Question
0

Running uninstaller script when removing class?

asked 2014-10-02 14:06:50 -0600

GLN gravatar image

Folks,

An interesting requirement that I am not sure how to handle. I have a class that does an installation on nodes, in some cases I am asked to later remove the class and the software. I want to be able to run some sort of an cleanup script on the node when the class is removed, is there a way to do so? An alternate way will be to prepare an cleanup class that will deploy do the removal but I wanted to if there is a more elegant solution (run cleanup script on removal of class that is a part of the original class itself).

Thanks GLN

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-10-03 07:35:45 -0600

llowder gravatar image

There isn't really a way to do this, but you can write the class to handle the case of ensure => absent, which is what the clean up class you mentioned likely would be.

Removing the class will only make the resources in it become unmanaged - not actually remove them.

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

Stats

Asked: 2014-10-02 14:06:50 -0600

Seen: 49 times

Last updated: Oct 03 '14