ansible-role-nginx/tasks/prerequisites/prerequisites.yml
Alessandro Fael Garcia 8b41c27cb5
Improve the error formatting when there's a syntax error (#324)
And remove the debug tasks messages.
2020-09-18 19:51:50 +02:00

19 lines
658 B
YAML

---
- name: "Install dependencies"
include_tasks: "{{ role_path }}/tasks/prerequisites/install-dependencies.yml"
- name: "Set up SELinux"
block:
- name: "Check if SELinux is enabled"
debug:
msg: "You need to enable SELinux, if it was disabled you need to reboot"
when: ansible_facts['selinux'] is undefined
- name: "Configure SELinux"
include_tasks: "{{ role_path }}/tasks/prerequisites/setup-selinux.yml"
when: ansible_facts['selinux.mode'] is defined
when:
- nginx_selinux | bool
- ansible_facts['os_family'] in ['RedHat', 'Suse']
- ansible_facts['distribution'] not in ['Amazon', 'OracleLinux']