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

puppet-nginx refactor to class/arguments #25

Merged
merged 2 commits into from
Oct 2, 2012

Conversation

guzmanbraso
Copy link
Contributor

These commits (hopefully) will add the first arguments to puppet-nginx and hopefully will set the basic idea for anyone to help refactor puppet-nginx make sure of not breaking current users of puppet-nginx.

The idea is that nothing should be trusted and everything must have a sane default value, arguments MUST have defaults from params.pp set on main class as well as for any subclass that needs it, so no matter no one should be calling subclasses (eg nginx::config) by themselves, we should set a default for it too, as someone may be calling it and not setting a default in the subclass call will break his configuration.

…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.
jfryman added a commit that referenced this pull request Oct 2, 2012
puppet-nginx refactor to class/arguments
@jfryman jfryman merged commit d10a514 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