Commit Graph

60 Commits

Author SHA1 Message Date
Jeff Geerling
227d1326ca Fix rule 208 lint issues. 2020-08-20 22:37:17 -05:00
Jeff Geerling
9ae8584281 Clarify that PPA addition only happens if configured. 2020-07-22 12:27:50 -05:00
Jeff Geerling
c5d73ace87 Ensure dirmngr is installed for gnupg compatibility. 2020-07-22 09:06:49 -05:00
Danilo G. Baio (dbaio)
cac5b664b6 Add quotes to ASSUME_ALWAYS_YES=yes
Prevent YAML interpreters to convert it to bool.
2019-08-26 14:42:33 -03:00
Danilo G. Baio (dbaio)
654229e203 Add ASSUME_ALWAYS_YES in FreeBSD pkg update 2019-06-27 21:15:00 -03:00
Jeff Geerling
79650c5886
Merge pull request #156 from spreedly/restart_via_handler
Don't start service in tasks. Defer to handlers to allow further configuration outside of role.
2019-06-06 11:45:00 -05:00
Jeff Geerling
630cf44e8d PR #156 follow-up: Make service state more configurable. 2019-06-06 11:24:51 -05:00
Jeff Geerling
e89289d5f1 Fix Ansible 2.8 deprecation warnings for bare vars. 2019-05-31 22:32:09 -05:00
Jamie Burchell
047896db9e
Use package module instead of yum
I noticed that your other roles have switched to using the package module instead of yum.
2019-05-13 20:03:36 +01:00
Jeff Geerling
e34b300d58 Resolve some tiny ansible-lint issues. 2018-12-06 16:53:24 -06:00
Jeff Geerling
695e0dc519 Fixes #175: root_group var should be used for vhosts file, RedHat setup. 2018-11-21 20:31:12 -06:00
Jeff Geerling
67c8be8106 Fix some Ansible Lint issues and set up yaml-lint options. 2018-09-25 22:42:06 -05:00
Bill ONeill
6df0200468
Allow customization of nginx service enablement/status. Default to enabled and started. 2018-05-21 10:13:32 -04:00
Jeff Geerling
212c68800c
Merge pull request #133 from amritsingh/master
Changed 'include' to 'import_tasks' and 'include_tasks'
2018-04-24 13:14:19 -05:00
Jeff Geerling
863d3227f5 Fix deprecation warnings in Ansible 2.5 for state 'present'. 2018-04-04 14:01:06 -05:00
Amrit Singh
dec3152c2d Changed 'include' to 'import_tasks' and 'include_tasks' as 'include' will be deprecated in v2.8 2017-11-08 16:12:54 +05:30
Ben McClure
08fbab26bd Added nginx support 2017-06-12 19:41:39 -05:00
Oskar Schöldström
7b47c3de12 vhost_filename -> filename 2017-06-03 09:01:09 -05:00
Oskar Schöldström
98b736f479 Add optional vhost_filename option to nginx_vhosts 2017-06-03 08:48:00 -05:00
Oskar Schöldström
5e41c6b1f9 Issue #95: Add support for setting template on a per vhost basis 2017-04-26 19:37:36 -05:00
Oskar Schöldström
36cd4d3aec Allow users to extend config files through template inheritance 2017-04-22 16:26:45 -05:00
Oskar Schöldström
0d931c53c3 Remove legacy vhosts.conf file 2017-04-22 10:03:18 -05:00
Oskar Schöldström
9cf49ac6c2 when statements should not include jinja2 templating delimiters 2017-04-21 07:46:45 -05:00
Oskar Schöldström
f8a04dd544 Write vhost configurations to separate config files 2017-04-21 07:25:18 -05:00
Edwin Steele
32d536242d Add OpenBSD support 2017-02-02 05:21:57 +11:00
Jesse Morgan
6f2b69b9b5 adding yum repo flag for Redhat
In environments where RHEL uses Satellite or production servers can't
reach out to the internet, and the Yum repo is not wanted. This commit
adds a flag to disable the functionality. It also removes the
enablerepo: nginx line from the package since a) it's redundant and b)
working around it overly complicates  the situation.
2017-01-25 11:49:27 -05:00
Jeff Geerling
19b1c5c9ba Merge pull request #73 from olo-dw/vhost_restart
Restart instead of reload after remove default.
2016-11-23 09:35:41 -06:00
Jeff Geerling
84b308c3d4 Fix test failures on Ubuntu 12.04. 2016-11-23 09:27:25 -06:00
Olivier LOCARD
f01357976c restart instead of reload after remove default. 2016-10-06 13:59:29 +02:00
Jeff Geerling
23f92af920 Tweak syntax and docs for vhosts config. 2016-09-24 10:35:18 -05:00
Jeff Geerling
ee5cd31375 Merge pull request #60 from danlamanna/fix-nginx-vhost-path-customization
Create the Nginx vhost path directory
2016-09-24 10:33:51 -05:00
Pedro Nofuentes
e03f85d4c3 Added vhosts filename variable to allow set it up 2016-06-28 11:35:43 +02:00
Dan LaManna
8aa51642b4 Create the Nginx vhost path directory
In particular, the default /usr/local/etc/nginx/sites-enabled directory does not
exist on installation of Nginx on FreeBSD.
2016-06-04 02:03:11 -04:00
Jeff Geerling
cbbcc8db16 Whitespace fixes and follow-up for PR #54. 2016-04-29 19:45:54 -05:00
Bartek Rutkowski
3d71531209 Add FreeBSD support. 2016-04-22 20:29:39 +01: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
cf69810612 PR #46 follow-up. 2016-02-29 14:58:02 -06: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
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
9848800982 PR #36 follow-up: clean up and reformat docs. 2015-12-28 09:57:11 -06: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
fe55597334 Correcting indentation for 'validate' param 2015-12-22 16:18:44 +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
Asa Gage
73d7140752 updating vhost conditional expressions to check count of list members 2015-12-10 09:00:39 -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
Jeff Geerling
d1828e9c39 Fixes #13: Allow configuration of default_release parameter for apt installation. 2015-02-25 07:59:24 -06:00
Jeff Geerling
90b6ddd1b3 Fixes #11: Add default/simple virtualhost configuration. 2015-02-21 00:02:51 -06:00