Skip to content

Commit b32c5cd

Browse files
authored
SELinux state should now be correctly set back to enforcing (#49)
1 parent 6e7839f commit b32c5cd

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ Update Molecule to `3.2.0` and Docker Python SDK to `4.4.0`.
88

99
BUG FIXES:
1010

11-
Switch to explicit boolean values in `sub_filter` defaults for `last_modified` and `since` in `nginx_config_main_template`. `"on"` and `"off"` values are treated as true instead of true/false when surrounded by double quotes. By always resorting to true/false we avoid unaccounted edge cases.
11+
* Switch to explicit boolean values in `sub_filter` defaults for `last_modified` and `since` in `nginx_config_main_template`. `"on"` and `"off"` values are treated as true instead of true/false when surrounded by double quotes. By always resorting to true/false we avoid unaccounted edge cases.
12+
* Fix issue whereas SELinux state would not be correctly set back to `enforcing` when `nginx_config_selinux: true`.
1213

1314
## 0.3.0 (November 17, 2020)
1415

defaults/main/selinux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# Set SELinux enforcing for NGINX (Centos/Redhat only) - you may need to open ports on your own
33
nginx_config_selinux: false
4-
# Enable enforcing mode if true. Permissive if false (audit only, no enforcing) globally (only works with nginx_unit_selinux: true)
4+
# Enable enforcing mode if true. Permissive if false (audit only, no enforcing) globally (only works with nginx_config_selinux: true)
55
nginx_config_selinux_enforcing: true
66
# List of TCP ports to add to http_port_t type (80 and 443 have this type already)
77
# nginx_config_selinux_tcp_ports:

tasks/prerequisites/setup-selinux.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
selinux:
2222
state: permissive
2323
policy: targeted
24-
changed_when: false
25-
when: ansible_facts['selinux']['mode'] == "enforcing"
2624

2725
- name: Allow SELinux HTTP network connections
2826
seboolean:
@@ -72,7 +70,4 @@
7270
selinux:
7371
state: enforcing
7472
policy: targeted
75-
changed_when: false
76-
when:
77-
- nginx_config_selinux_enforcing
78-
- ansible_facts['selinux']['mode'] == "permissive"
73+
when: nginx_config_selinux_enforcing

0 commit comments

Comments
 (0)