2015-05-28 11:32:57 +02:00
|
|
|
---
|
2020-01-22 14:37:31 +01:00
|
|
|
- import_tasks: nginx-deb.yml
|
|
|
|
when: ansible_distribution_file_variety == "Debian"
|
|
|
|
- import_tasks: nginx-rh.yml
|
|
|
|
when: ansible_distribution_file_variety == "RedHat"
|
2018-08-09 17:48:03 +02:00
|
|
|
- import_tasks: nginx-config.yml
|
|
|
|
- import_tasks: nginx-virtualhosts.yml
|
2020-01-22 14:37:31 +01:00
|
|
|
when: nginx_use_common_virthost | bool
|
2018-08-09 17:48:03 +02:00
|
|
|
- import_tasks: nginx-letsencrypt.yml
|
2016-04-22 18:55:20 +02:00
|
|
|
when: letsencrypt_acme_install is defined and letsencrypt_acme_install
|
2018-08-09 17:48:03 +02:00
|
|
|
- import_tasks: basic-auth.yml
|
|
|
|
- import_tasks: pam-ldap.yml
|
2016-07-03 12:19:12 +02:00
|
|
|
|
|
|
|
- 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
|