2020-09-15 21:27:06 +02:00
|
|
|
---
|
2020-09-19 17:32:17 +02:00
|
|
|
- name: Install dependencies
|
2022-03-22 18:27:11 +01:00
|
|
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/prerequisites/install-dependencies.yml"
|
2020-09-15 21:27:06 +02:00
|
|
|
|
2020-09-19 17:32:17 +02:00
|
|
|
- name: Set up SELinux
|
2020-09-15 21:27:06 +02:00
|
|
|
block:
|
2020-09-19 17:32:17 +02:00
|
|
|
- name: Check if SELinux is enabled
|
2022-03-22 18:27:11 +01:00
|
|
|
ansible.builtin.debug:
|
2020-09-19 17:32:17 +02:00
|
|
|
msg: You need to enable SELinux, if it was disabled you need to reboot
|
2020-09-15 21:27:06 +02:00
|
|
|
when: ansible_facts['selinux'] is undefined
|
|
|
|
|
2020-09-19 17:32:17 +02:00
|
|
|
- name: Configure SELinux
|
2022-03-22 18:27:11 +01:00
|
|
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/prerequisites/setup-selinux.yml"
|
2020-10-08 12:48:56 +02:00
|
|
|
when: ansible_facts['selinux']['mode'] is defined
|
2020-09-15 21:27:06 +02:00
|
|
|
when:
|
|
|
|
- nginx_selinux | bool
|
2020-10-08 12:48:56 +02:00
|
|
|
- "'selinux' in ansible_facts"
|
2020-09-15 21:27:06 +02:00
|
|
|
- ansible_facts['os_family'] in ['RedHat', 'Suse']
|
|
|
|
- ansible_facts['distribution'] not in ['Amazon', 'OracleLinux']
|