2020-05-28 14:52:45 +02:00
|
|
|
---
|
2020-06-02 14:52:24 +02:00
|
|
|
- import_tasks: nginx-deb.yml
|
|
|
|
when: ansible_distribution_file_variety == "Debian"
|
|
|
|
- import_tasks: nginx-rh.yml
|
|
|
|
when: ansible_distribution_file_variety == "RedHat"
|
|
|
|
- import_tasks: nginx-config.yml
|
|
|
|
- import_tasks: nginx-virtualhosts.yml
|
|
|
|
when: nginx_use_common_virthost | bool
|
2021-07-07 14:03:33 +02:00
|
|
|
- import_tasks: robots-txt.yml
|
2020-06-09 14:44:21 +02:00
|
|
|
- import_tasks: nginx-logrotate.yml
|
2020-06-02 14:52:24 +02:00
|
|
|
- import_tasks: nginx-letsencrypt.yml
|
|
|
|
when: letsencrypt_acme_install is defined and letsencrypt_acme_install
|
|
|
|
- import_tasks: basic-auth.yml
|
|
|
|
- import_tasks: pam-ldap.yml
|
|
|
|
|
|
|
|
- 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
|