ansible-roles/nginx/tasks/nginx.yml

29 lines
629 B
YAML

---
- name: Install the nginx web server
apt: pkg={{ item }} state=installed
with_items:
- nginx-full
when: not nginx_use_ldap_pam_auth
tags:
- nginx
- name: Install the nginx web server if we need ldap auth via pam
apt: pkg={{ item }} state=installed
with_items:
- nginx-extras
when: nginx_use_ldap_pam_auth
tags:
- nginx
- name: remove nginx default config
file: dest=/etc/nginx/sites-enabled/default state=absent
notify:
Reload nginx
tags:
- nginx
- name: Ensure that the webserver is running
service: name=nginx state=started enabled={{ nginx_enabled }}
tags:
- nginx