ansible-role-nginx/tasks/prerequisites/prerequisites.yml

20 lines
734 B
YAML

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