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

Allow purge of confd dir as optional argument. #26

Merged
merged 3 commits into from
Oct 2, 2012

Conversation

guzmanbraso
Copy link
Contributor

Resources created by puppet-nginx (upstreams,vhosts,etc) after removed kept the files for ever in /etc/nginx/conf.d . This allowed situations where someone removed a resource but it kept working anyway.

Added a new variable in params.pp "nx_confd_purge" default value false and a new optional argument confd_purge that allow to choose to get conf.d directory emptied of any file not managed by puppet.

…vhosts defined

Description:
When running first time from scratch, if class was included without any setup at all
and with sane defaults, in debian squeeze generates an error when trying to collect
non existant vhosts, because cat complains that can not expand * because there are no
files.

Changed:
Added unless to check that at least there is a file in nginx.d by testing it can expand.
…new structure, backwards compatible

Defaults are set inside params, nginx class will set default and send it from local var to nginx::config,
so even when there is no need for set default values on nginx::config, in case someone already using
this module it's for some reason calling directly nginx::config, to avoid breaking anything defaults are
set inside nginx::config too.
Added confd_purge option to tell it to purge files non managed by pupet in conf.d, default is false.

Because vhost_autogen it's not actually managed by puppet but indirectly created by a puppet executed
command, it's added as ignore to avoid getting it removed.

Better formating for confd purge support

Better formating for confd purge support
jfryman added a commit that referenced this pull request Oct 2, 2012
Allow purge of confd dir as optional argument.
@jfryman jfryman merged commit 32ea70c into voxpupuli:master Oct 2, 2012
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.

2 participants