Skip to content

Commit 674999c

Browse files
dudefellahalessfg
andauthored
Fix tests for selinux facts (#30)
Co-authored-by: Alessandro Fael Garcia <[email protected]>
1 parent 8aece99 commit 674999c

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
@@ -14,6 +14,7 @@ ENHANCEMENTS:
1414
BUG FIXES:
1515

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

1819
## 0.2.0 (September 24, 2020)
1920

tasks/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
include_tasks: "{{ role_path }}/tasks/prerequisites/setup-selinux.yml"
44
when:
55
- nginx_config_selinux | bool
6-
- ansible_facts['selinux.mode'] is defined
6+
- "'selinux' in ansible_facts"
7+
- ansible_facts['selinux']['mode'] is defined
78
- ansible_facts['os_family'] in ['RedHat', 'Suse']
89
tags: nginx_config_selinux
910

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:
@@ -75,4 +75,4 @@
7575
changed_when: false
7676
when:
7777
- nginx_config_selinux_enforcing
78-
- ansible_facts['selinux.mode'] == "permissive"
78+
- ansible_facts['selinux']['mode'] == "permissive"

0 commit comments

Comments
 (0)