Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/voxpupuli/puppet-nginx in…
Browse files Browse the repository at this point in the history
…to dev
  • Loading branch information
abraham1901 committed Sep 2, 2016
2 parents 8350529 + 6bdf457 commit d91cc76
Show file tree
Hide file tree
Showing 12 changed files with 868 additions and 33 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ Gemfile.lock
Gemfile.local
vendor/
.vendor/
spec/fixtures/
spec/fixtures/manifests/
spec/fixtures/modules/
.vagrant/
.bundle/
coverage/
Expand Down
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
modulesync_config_version: '0.12.4'
modulesync_config_version: '0.12.5'
3 changes: 3 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
.travis.yml:
secure: "SDpX6jzritODonEQBqy9g0NbOmk2a9dBfAtZLrvHwM8BTpM2W0Y1daqzIbpzxFiqlNX+6r2GSq9SV70N0A9Ko/uPV9aG/XZx7MsBR9DNVjgqjJSl7+aF88VJfRpOv4PAyTM33JMx91nLFxM/ql61YX+2DXGXrhUkBsMZcdBgQnk="
14 changes: 7 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ matrix:
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" FUTURE_PARSER="yes" CHECK=test
- rvm: 2.1
- rvm: 2.1.9
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 2.1
- rvm: 2.1.9
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.2
- rvm: 2.2.5
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.3.1
env: PUPPET_VERSION="~> 4.0" CHECK=build
env: PUPPET_VERSION="~> 4.0" CHECK=build DEPLOY_TO_FORGE=yes
- rvm: 2.3.1
env: PUPPET_VERSION="~> 4.0" CHECK=rubocop
- rvm: 2.3.1
Expand All @@ -43,10 +43,10 @@ deploy:
branch: ha-bug-puppet-forge
user: puppet
password:
secure: ""
secure: "SDpX6jzritODonEQBqy9g0NbOmk2a9dBfAtZLrvHwM8BTpM2W0Y1daqzIbpzxFiqlNX+6r2GSq9SV70N0A9Ko/uPV9aG/XZx7MsBR9DNVjgqjJSl7+aF88VJfRpOv4PAyTM33JMx91nLFxM/ql61YX+2DXGXrhUkBsMZcdBgQnk="
on:
tags: true
# all_branches is required to use tags
all_branches: true
# Only publish if our main Ruby target builds
rvm: 2.3.1
# Only publish the build marked with "DEPLOY_TO_FORGE"
condition: "$DEPLOY_TO_FORGE = yes"
793 changes: 793 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions README.markdown → README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# NGINX Module

This module got migrated from James Fryman <james@frymanet.com> and Matthew Haughton <matt@3flex.com.au> to Vox Pupuli.


## INSTALLING OR UPGRADING
** Please note **: This module is currently undergoing some structural
maintenance. Please take a look at [https://github.com/jfryman/puppet-nginx/blob/master/docs/hiera.md](https://github.com/jfryman/puppet-nginx/blob/master/docs/hiera.md)
maintenance. Please take a look at [https://github.com/voxpupuli/puppet-nginx/blob/master/docs/hiera.md](https://github.com/voxpupuli/puppet-nginx/blob/master/docs/hiera.md)
before upgrading or installing Version 0.1.0 or greater.

[![Puppet
Forge](http://img.shields.io/puppetforge/v/jfryman/nginx.svg)](https://forge.puppetlabs.com/jfryman/nginx)
[![Build Status](https://travis-ci.org/jfryman/puppet-nginx.svg?branch=master)](https://travis-ci.org/jfryman/puppet-nginx)

Forge](http://img.shields.io/puppetforge/v/puppet/nginx.svg)](https://forge.puppetlabs.com/puppet/nginx)
[![Build Status](https://travis-ci.org/voxpupuli/puppet-nginx.svg?branch=master)](https://travis-ci.org/voxpupuli/puppet-nginx)

* James Fryman <james@frymanet.com>
* Matthew Haughton <matt@3flex.com.au>

This module manages NGINX configuration.

### Requirements

* Puppet-2.7.0 or later
* Puppet 3.0.0 or later
* Facter 1.7.0 or later
* Ruby-1.9.3 or later (Support for Ruby-1.8.7 is not guaranteed. YMMV).
* Ruby 1.9.3 or later (Support for Ruby-1.8.7 is not guaranteed. YMMV).

### Additional Documentation

* [A Quickstart Guide to the NGINX Puppet Module][quickstart]
[quickstart]: https://github.com/jfryman/puppet-nginx/blob/master/docs/quickstart.md
[quickstart]: https://github.com/voxpupuli/puppet-nginx/blob/master/docs/quickstart.md


### Install and bootstrap an NGINX instance
Expand Down
5 changes: 5 additions & 0 deletions manifests/resource/location.pp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
# that you can split the script_name and path_info via regex
# [*uwsgi*] - location of uwsgi (host:port)
# [*uwsgi_params*] - optional alternative uwsgi_params file to use
# [*uwsgi_read_timeout*] - optional value for uwsgi_read_timeout
# [*ssl*] - Indicates whether to setup SSL bindings for
# this location.
# [*ssl_only*] - Required if the SSL and normal vHost have the
Expand Down Expand Up @@ -157,6 +158,7 @@
$fastcgi_split_path = undef,
$uwsgi = undef,
$uwsgi_params = "${nginx::config::conf_dir}/uwsgi_params",
$uwsgi_read_timeout = undef,
$ssl = false,
$ssl_only = false,
$location_alias = undef,
Expand Down Expand Up @@ -238,6 +240,9 @@
validate_string($uwsgi)
}
validate_string($uwsgi_params)
if ($uwsgi_read_timeout != undef) {
validate_string($uwsgi_read_timeout)
}

validate_bool($internal)

Expand Down
6 changes: 6 additions & 0 deletions manifests/resource/vhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
# [*fastcgi*] - location of fastcgi (host:port)
# [*fastcgi_params*] - optional alternative fastcgi_params file to use
# [*fastcgi_script*] - optional SCRIPT_FILE parameter
# [*uwsgi_read_timeout*] - optional value for uwsgi_read_timeout
# [*ssl*] - Indicates whether to setup SSL bindings for this
# vhost.
# [*ssl_cert*] - Pre-generated SSL Certificate file to reference
Expand Down Expand Up @@ -235,6 +236,7 @@
$fastcgi_script = undef,
$uwsgi = undef,
$uwsgi_params = "${nginx::config::conf_dir}/uwsgi_params",
$uwsgi_read_timeout = undef,
$index_files = [
'index.html',
'index.htm',
Expand Down Expand Up @@ -418,6 +420,9 @@
validate_string($uwsgi)
}
validate_string($uwsgi_params)
if ($uwsgi_read_timeout != undef) {
validate_string($uwsgi_read_timeout)
}
validate_array($index_files)
if ($autoindex != undef) {
validate_string($autoindex)
Expand Down Expand Up @@ -619,6 +624,7 @@
fastcgi_script => $fastcgi_script,
uwsgi => $uwsgi,
uwsgi_params => $uwsgi_params,
uwsgi_read_timeout => $uwsgi_read_timeout,
try_files => $try_files,
www_root => $www_root,
autoindex => $autoindex,
Expand Down
46 changes: 32 additions & 14 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
{
"name": "jfryman-nginx",
"version": "0.3.0",
"author": "James Fryman",
"name": "puppet-nginx",
"version": "0.4.1-rc0",
"author": "Vox Pupuli",
"summary": "Puppet NGINX management module",
"license": "MIT",
"source": "https://github.com/jfryman/puppet-nginx.git",
"project_page": "http://github.com/jfryman/puppet-nginx",
"issues_url": "https://github.com/jfryman/puppet-nginx/issues",
"source": "https://github.com/voxpupuli/puppet-nginx.git",
"project_page": "http://github.com/voxpupuli/puppet-nginx",
"issues_url": "https://github.com/voxpupuli/puppet-nginx/issues",
"dependencies": [
{"name":"puppetlabs/stdlib","version_requirement":">= 4.2.0 <5.0.0"},
{"name":"puppetlabs/apt","version_requirement":">= 1.8.0 <3.0.0"},
{"name":"puppetlabs/concat","version_requirement":">= 1.1.1 <3.0.0"}
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 4.2.0 <5.0.0"
},
{
"name": "puppetlabs/apt",
"version_requirement": ">= 1.8.0 <3.0.0"
},
{
"name": "puppetlabs/concat",
"version_requirement": ">= 1.1.1 <3.0.0"
}
],
"requirements": [
{
Expand All @@ -25,7 +34,7 @@
"operatingsystem_support": [
{
"operatingsystem": "Debian",
"operatingsystemrelease":[
"operatingsystemrelease": [
"5",
"6",
"7"
Expand All @@ -36,7 +45,7 @@
},
{
"operatingsystem": "RedHat",
"operatingsystemrelease":[
"operatingsystemrelease": [
"5",
"6",
"7"
Expand All @@ -48,9 +57,18 @@
{
"operatingsystem": "Solaris"
},
{ "operatingsystem": "AIX" },
{ "operatingsystem": "FreeBSD" },
{ "operatingsystem": "NetBSD" },
{
"operatingsystem": "AIX"
},
{
"operatingsystem": "FreeBSD"
},
{
"operatingsystem": "NetBSD"
},
{
"operatingsystem": "Archlinux"
},
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
Expand Down
6 changes: 6 additions & 0 deletions spec/defines/resource_location_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,12 @@
attr: 'uwsgi',
value: 'value',
match: %r{\s+uwsgi_pass\s+value;}
},
{
title: 'should set uwsgi_read_timeout',
attr: 'uwsgi_read_timeout',
value: '300s',
match: %r{\s+uwsgi_read_timeout\s+300s;}
}
].each do |param|
context "when #{param[:attr]} is #{param[:value]}" do
Expand Down
2 changes: 1 addition & 1 deletion spec/defines/resource_vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@
default_params.merge(uwsgi: 'uwsgi_upstream')
end

it { should contain_file('/etc/nginx/uwsgi_params').with_mode('0770') }
it { should contain_file('/etc/nginx/uwsgi_params').with_mode('0660') }
end

context 'when listen_port == ssl_port' do
Expand Down
3 changes: 3 additions & 0 deletions templates/vhost/locations/uwsgi.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@
<% end -%>
include <%= @uwsgi_params %>;
uwsgi_pass <%= @uwsgi %>;
<% if @uwsgi_read_timeout-%>
uwsgi_read_timeout <%= @uwsgi_read_timeout %>;
<% end -%>

0 comments on commit d91cc76

Please sign in to comment.