forked from ISTI-ansible-roles/ansible-roles
library/roles/nginx/tasks/nginx.yml: Add support for the Ubuntu nginx ppa. Disabled by default.
This commit is contained in:
parent
d1f1f5c7a0
commit
88e26ff0f4
|
@ -1,6 +1,11 @@
|
||||||
---
|
---
|
||||||
|
- name: Install the Ubuntu PPA for nginx
|
||||||
|
apt_repository: repo='{{ nginx_ppa_repo }}'
|
||||||
|
when: nginx_use_ppa
|
||||||
|
tags: [ 'nginx', 'nginx_ppa' ]
|
||||||
|
|
||||||
- name: Install the nginx web server
|
- name: Install the nginx web server
|
||||||
apt: pkg={{ item }} state=installed
|
apt: pkg={{ item }} state={{ nginx_package_state }} update_cache=yes
|
||||||
with_items:
|
with_items:
|
||||||
- nginx-full
|
- nginx-full
|
||||||
when: not nginx_use_ldap_pam_auth
|
when: not nginx_use_ldap_pam_auth
|
||||||
|
@ -24,14 +29,3 @@
|
||||||
notify: Reload nginx
|
notify: Reload nginx
|
||||||
tags: [ 'nginx', 'nginx_conf' ]
|
tags: [ 'nginx', 'nginx_conf' ]
|
||||||
|
|
||||||
- name: Ensure that the webserver is running and enabled at boot time
|
|
||||||
service: name=nginx state=started enabled=yes
|
|
||||||
when: nginx_enabled
|
|
||||||
ignore_errors: True
|
|
||||||
tags: nginx
|
|
||||||
|
|
||||||
- name: Ensure that the webserver is stopped and disabled
|
|
||||||
service: name=nginx state=stopped enabled=no
|
|
||||||
when: not nginx_enabled
|
|
||||||
ignore_errors: True
|
|
||||||
tags: nginx
|
|
||||||
|
|
Loading…
Reference in New Issue