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

19 lines
648 B
YAML
Raw Normal View History

2020-09-15 21:27:06 +02:00
---
2020-09-19 17:32:17 +02:00
- name: Install dependencies
2020-09-15 21:27:06 +02:00
include_tasks: "{{ role_path }}/tasks/prerequisites/install-dependencies.yml"
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
2020-09-15 21:27:06 +02:00
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
2020-09-15 21:27:06 +02:00
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']