Skip to content

Commit c656bfd

Browse files
committed
This time it should work.
1 parent f20e1e3 commit c656bfd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

security/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
proto: tcp
1515
setype: ssh_port_t
1616
state: present
17+
when: ansible_selinux.status == 'enabled'
1718

1819
- name: Update SSH configuration to be more secure.
1920
lineinfile:
@@ -147,9 +148,11 @@
147148
selinux:
148149
policy: targeted
149150
state: enforcing
151+
when: ansible_selinux.status == 'enabled'
150152

151153
- name: Ensure httpd can connect to the network.
152154
seboolean:
153155
name: httpd_can_network_connect
154156
state: yes
155157
persistent: yes
158+
when: ansible_selinux.status == 'enabled'

0 commit comments

Comments
 (0)