Fix SELinux facts (#337)

This commit is contained in:
Alessandro Fael Garcia 2020-10-08 12:48:56 +02:00 committed by GitHub
parent d2bbd05aa4
commit 2715baca1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -10,6 +10,7 @@ ENHANCEMENTS:
BUG FIXES:
* Prevent TravisCI from trying to build (and failing) NGINX Plus images on external PRs.
* Fix naming for SELinux facts dict.
## 0.17.2 (September 24, 2020)

View File

@ -11,8 +11,9 @@
- name: Configure SELinux
include_tasks: "{{ role_path }}/tasks/prerequisites/setup-selinux.yml"
when: ansible_facts['selinux.mode'] is defined
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']

View File

@ -22,7 +22,7 @@
state: permissive
policy: targeted
changed_when: false
when: ansible_facts['selinux.mode'] == "enforcing"
when: ansible_facts['selinux']['mode'] == "enforcing"
- name: Allow SELinux HTTP network connections
seboolean:
@ -99,4 +99,4 @@
changed_when: false
when:
- nginx_selinux_enforcing | bool
- ansible_facts['selinux.mode'] == "permissive"
- ansible_facts['selinux']['mode'] == "permissive"