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
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.
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).
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.
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).
For Debian systems both conf.d and sites-enabled should be included by default. Redhat systems have not been changed.
Issues came up using Kibana on Ubuntu as it installs kibana.conf in the conf.d folder.