Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parameter to allow purging plugins, handlers, extensions and mutators #302

Merged
merged 3 commits into from
Jan 26, 2015

Conversation

nhinds
Copy link
Contributor

@nhinds nhinds commented Jan 25, 2015

The default behaviour is not to purge, matching the existing behaviour.

Currently if I remove a sensu::plugin, sensu::handler or sensu::extension definition, the plugin/handler/extension remains on disk. This parameter allows these to be removed automatically when they are removed from puppet.

NB: there is currently a purge setting on sensu::plugin which is supposed to do this, but it only works if the sensu::manage_plugins_dir parameter is set to false - if sensu::manage_plugins_dir is true, sensu::package manages /etc/sensu/plugins and doesn't set the purge parameter.

…tors

The default behaviour is not to purge, matching the existing behaviour.
@jessereynolds
Copy link

+1 ... I was expecting this behaviour when i was getting started with this module.

@jamtur01
Copy link
Contributor

@jlambert121 ?

@jlambert121
Copy link
Contributor

Is there a reason to not reuse the existing purge flag? Having multiple purge flags seems to make the code more confusing.

@nhinds
Copy link
Contributor Author

nhinds commented Jan 26, 2015

Fair enough - I can reuse sensu::purge_config for this.

The reason I avoided using it initially is that I thought it was intended to control only the JSON configuration files in conf.d, and because the files in plugins/handlers/extensions/mutators feel more like code than configuration. But I'm happy to use the same flag, since I'd expect most people who set purge_config would also want the rest of the files to be managed by puppet.

@jlambert121
Copy link
Contributor

I could be wrong, but my thought is people are either going to want puppet to delete unused stuff for them or not. If this turns out to be untrue we will have to get more granular.

jlambert121 added a commit that referenced this pull request Jan 26, 2015
Add parameter to allow purging plugins, handlers, extensions and mutators
@jlambert121 jlambert121 merged commit 6e1f607 into sensu:master Jan 26, 2015
@jlambert121
Copy link
Contributor

Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants