Commit Graph

90 Commits

Author SHA1 Message Date
Pedro Nofuentes
e03f85d4c3 Added vhosts filename variable to allow set it up 2016-06-28 11:35:43 +02:00
Jeff Geerling
82575ce142 Merge pull request #56 from geerlingguy/revert-53-feature/whitespace-control
Revert "prevent whitespace from jinja control structures from making it into templates"
2016-05-06 16:45:10 -05:00
Jeff Geerling
4fb38405f9 Revert "prevent whitespace from jinja control structures from making it into templates" 2016-05-06 16:44:36 -05:00
Jeff Geerling
f7e43de918 Merge pull request #53 from benjamin-smith/feature/whitespace-control
prevent whitespace from jinja control structures from making it into templates
2016-05-06 11:16:33 -05:00
Jeff Geerling
ddd118a2fd Merge pull request #52 from benjamin-smith/feature/optional-server_name
make the "server_name" directive optional
2016-05-06 11:14:16 -05:00
Jeff Geerling
1d3ac0840d Fixes #28: Make server_names_hash_bucket_size configurable. 2016-05-06 11:13:17 -05:00
Jeff Geerling
cbbcc8db16 Whitespace fixes and follow-up for PR #54. 2016-04-29 19:45:54 -05:00
Jeff Geerling
7163dbfc12 Merge pull request #54 from bartekrutkowski/master
Add FreeBSD support.
2016-04-29 19:44:30 -05:00
Bartek Rutkowski
3d71531209 Add FreeBSD support. 2016-04-22 20:29:39 +01:00
Benjamin Smith
295584baf8 update jinja templates to not leave whitespace from jinja control structures 2016-03-29 13:15:33 -04:00
Benjamin Smith
102949fcb8 make the "server_name" directive optional 2016-03-29 12:35:06 -04:00
Jeff Geerling
e818255465 PR #45: Clean up var names and document new feature. 2016-03-25 22:15:25 -05:00
Jeff Geerling
3af0b284c1 Merge pull request #45 from 3wille/fw-ubuntu-ppa
add official nginx ppa for ubuntu
2016-03-25 22:06:09 -05:00
Jeff Geerling
baa802befe Merge pull request #47 from colinhoglund/master
Convert pidfile into a variable.
2016-03-17 10:06:00 -05:00
Jeff Geerling
666e88f2a9 PR #50 follow-up: Document new variable. 2016-03-17 10:03:04 -05:00
Jeff Geerling
a364055306 Merge pull request #50 from leventyalcin/master
multi_accept option added
2016-03-17 09:58:00 -05:00
Levent YALCIN
5f6b023f68 multi_accept option added 2016-03-17 14:46:59 +00:00
Jeff Geerling
90aeacbdd3 Merge pull request #49 from techraf/restore-enabled-sites-default-behaviour
Restore nginx's default search pattern for sites-enabled
2016-02-29 15:00:50 -06:00
Jeff Geerling
8ee00b9266 Update role for Ansible Galaxy 2.x notifications. 2016-02-29 14:58:50 -06:00
Jeff Geerling
cf69810612 PR #46 follow-up. 2016-02-29 14:58:02 -06:00
Jeff Geerling
2040351a0a Merge pull request #46 from mwolny/master
Define package name and options within main context
2016-02-29 14:56:43 -06:00
techraf
c4816d0c08 Restore nginx's default search pattern for sites-enabled 2016-02-29 23:04:05 +09:00
Colin Hoglund
aebf9c6c63 changing Debian pidfile 2016-02-17 13:52:17 -05:00
Marcin Wolny
790badecb3 Define nginx's global options and package name. 2016-02-11 19:03:30 +01:00
Frederik Wille
3063875875 add official nginx ppa for ubuntu
adds ppa:nginx to apt repositories when
nginx_use_ppa is set to yes (default no)

nginx_ppa_version can be either "stable" or "development"

this will reinstall nginx if ppa was just added to ensure that the ppa
version will be installed
2016-02-09 10:06:08 +01:00
Jeff Geerling
2cce06230f Merge pull request #42 from aleksandr-vin/fix/github-41-issue-wrong-SELinux-context
Remove new config validation, Fix #41
2016-01-22 09:36:59 -06:00
Aleksandr Vinokurov
5294d77fa3 Remove new config validation, Fix #41
NOTE: current nginx config validation process breaks SELinux context
for pid file, as described in #41

Restart of nginx is not needed for configuration changes and is
replaced with reload, which will validate config before applying it,
leaving running nginx process untouched in case of any validation
errors.

Restart handler left in support.
2016-01-22 12:56:30 +03:00
Jeff Geerling
357ab200f7 PR #36 follow-up: rename var to nginx_extra_http_options. 2015-12-28 10:01:42 -06:00
Jeff Geerling
9848800982 PR #36 follow-up: clean up and reformat docs. 2015-12-28 09:57:11 -06:00
Jeff Geerling
a8620b9b32 Merge pull request #36 from cmacrae/master
Collective config validation & "extra options"
2015-12-28 09:53:44 -06:00
Jeff Geerling
3ea03870a6 Merge pull request #37 from opdavies/vhost-make-root-optional
Only add root if it's defined
2015-12-28 09:52:12 -06:00
Jeff Geerling
6ae418802b Merge pull request #38 from opdavies/vhost-add-error-log
Add an additional parameter for error_log within virtual hosts
2015-12-28 09:50:18 -06:00
Oliver Davies
bd881c0bc7 Document error_log 2015-12-28 13:16:30 +00:00
Oliver Davies
74fe80b1cb Document error_log 2015-12-28 13:10:15 +00:00
Oliver Davies
3de8c915a0 Add error_log 2015-12-28 13:09:41 +00:00
Oliver Davies
19ddc34cbb Only add root if it's defined 2015-12-25 19:42:17 +00:00
cmacrae
bfa4fe7925 Correcting nginx config path in validate handler 2015-12-22 17:07:47 +00:00
cmacrae
a248416a4d Ensuring all instances that notify 'restart nginx' also validate first 2015-12-22 16:55:29 +00:00
cmacrae
fd6b8c8e6b Addning handler for Nginx config validation:
Although the 'validate' param was added for the deployment of
/etc/nginx.conf - this validation process will only be triggered upon
changes.
So, if a vhost config is updated, but the main config isn't, the
collective config will not be verified.

I've added a new handler 'validate nginx configuration' and added this
to the 'notify' param as a first list item for vhost config changes.

Unfortunately, this will not protect against the deployment of malformed
configuration, however it will prevent the restart of Nginx in such a
situation (as the 'validate nginx configuration' handler should error
out before the 'restart nginx' handler is called).
2015-12-22 16:36:11 +00:00
cmacrae
cd5e355707 Cleaner indentation for 'nginx_extra_options' 2015-12-22 16:21:16 +00:00
cmacrae
fe55597334 Correcting indentation for 'validate' param 2015-12-22 16:18:44 +00:00
cmacrae
3fc2135bc4 Adding example 'nginx_extra_options' comment to defaults/main.yml 2015-12-22 16:11:35 +00:00
cmacrae
c5a21436b4 Adding the ability to define extra options:
Defining a new variable (defaults to empty) that allows users to define
extra configuration options in the top-level 'http' block.
This allows for (optionally) finer grain control.
2015-12-22 16:05:46 +00:00
cmacrae
cc5114dc4f Re-order template deploy & add validate:
Re-ordering the tasks in this way (having the vhosts deployed first)
allows the 'validate' param to collectively check the deployed Nginx config.

Deploying vhosts after makes it hard to check their validity, as Nginx's
config checking will operate on a "master" configuration that includes
others (checking those included, also) but would error out when checking
these individual configs if they do not contain a fully working Nginx
config (which they often don't, due to their nature).
2015-12-22 16:05:28 +00:00
Jeff Geerling
1f99c72698 Merge pull request #34 from asagage/fix-vhost-check
updating vhost conditional expressions to check count of list members
2015-12-10 14:53:37 -06:00
Asa Gage
73d7140752 updating vhost conditional expressions to check count of list members 2015-12-10 09:00:39 -05:00
Jeff Geerling
e9aa607bb6 Merge pull request #23 from fritz-c/patch-1
PR #23: Remove unnecessary semicolon from vhosts config.
2015-09-04 10:03:08 -05:00
Jeff Geerling
a08f8cda11 Fixes #20: Add example of a complete nginx_vhosts entry with extra_parameters. 2015-09-03 16:24:58 -05:00
Jeff Geerling
fc88ba2570 Fixes #24: Update apt cache if it hasn't been updated in a day. 2015-08-24 13:52:44 -05:00
Chris Fritz
c5672bf89b Remove unnecessary semicolon from vhosts config
Remove semicolon after `{{ vhost.extra_parameters }}` to allow support for blocks like `location ~ \.php$ { ... }`.
2015-08-06 20:05:31 +09:00