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

Prepend to the nginx config block #574

Merged
merged 3 commits into from
Mar 9, 2015

Conversation

prachetasp
Copy link
Contributor

What's this PR do?

Adds functionality and tests for prepending key/value pairs to the top of the nginx configuration. Tests mimicking the http_cfg_append tests have been added since this functionality is identical albeit in a different place. All rspec tests are currently passing. Furthermore, this change is currently working on a CentOS 6.6 (Final) staging box at a client site. I did not add to the README documentation since there doesn't seem to be a good place to put this. Let me know if there is somewhere you want me to add it.

Where should the reviewer start?

Begin in the manifests/config.pp file with the $nginx_cfg_prepend variable validation. Then check the templates/conf.d/nginx.conf.erb for the added nginx_cfg_prepend block.

How should this be tested?

By running bundle exec rake spec for the unit tests. Tests have been added for this change.

Any background context you want to provide?

At Railsdog we support several sites that run Nginx/Passenger and Rbenv on RHEL derivatives. One of the requirements is to feed environment variables to the Passenger process via the Nginx config. This is easily accomplished by using http://nginx.org/en/docs/ngx_core_module.html#env. The only issue is that this variable can only occur at the top of the main nginx config block. Figured others could use this feature as well!

@jfryman
Copy link
Contributor

jfryman commented Mar 9, 2015

Nice. Thank you very much for the code! 🙇

jfryman added a commit that referenced this pull request Mar 9, 2015
@jfryman jfryman merged commit 3322fb5 into voxpupuli:master Mar 9, 2015
cegeka-jenkins pushed a commit to cegeka/puppet-nginx that referenced this pull request Oct 23, 2017
…repend

Prepend to the nginx config block
slm0n87 pushed a commit to slm0n87/puppet-nginx that referenced this pull request Mar 7, 2019
…repend

Prepend to the nginx config block
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