Skip to content

Commit 2715bac

Browse files
authored
Fix SELinux facts (#337)
1 parent d2bbd05 commit 2715bac

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ENHANCEMENTS:
1010
BUG FIXES:
1111

1212
* Prevent TravisCI from trying to build (and failing) NGINX Plus images on external PRs.
13+
* Fix naming for SELinux facts dict.
1314

1415
## 0.17.2 (September 24, 2020)
1516

tasks/prerequisites/prerequisites.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111

1212
- name: Configure SELinux
1313
include_tasks: "{{ role_path }}/tasks/prerequisites/setup-selinux.yml"
14-
when: ansible_facts['selinux.mode'] is defined
14+
when: ansible_facts['selinux']['mode'] is defined
1515
when:
1616
- nginx_selinux | bool
17+
- "'selinux' in ansible_facts"
1718
- ansible_facts['os_family'] in ['RedHat', 'Suse']
1819
- ansible_facts['distribution'] not in ['Amazon', 'OracleLinux']

tasks/prerequisites/setup-selinux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
state: permissive
2323
policy: targeted
2424
changed_when: false
25-
when: ansible_facts['selinux.mode'] == "enforcing"
25+
when: ansible_facts['selinux']['mode'] == "enforcing"
2626

2727
- name: Allow SELinux HTTP network connections
2828
seboolean:
@@ -99,4 +99,4 @@
9999
changed_when: false
100100
when:
101101
- nginx_selinux_enforcing | bool
102-
- ansible_facts['selinux.mode'] == "permissive"
102+
- ansible_facts['selinux']['mode'] == "permissive"

0 commit comments

Comments
 (0)