|
18 | 18 | when: ansible_facts['os_family'] == "RedHat"
|
19 | 19 |
|
20 | 20 | - name: Set SELinux mode to permissive
|
21 |
| - selinux: |
| 21 | + ansible.posix.selinux: |
22 | 22 | state: permissive
|
23 | 23 | policy: targeted
|
24 | 24 | when: not (ansible_check_mode and nginx_config_selinux_enforcing)
|
25 | 25 |
|
26 | 26 | - name: Allow SELinux HTTP network connections
|
27 |
| - seboolean: |
| 27 | + ansible.posix.seboolean: |
28 | 28 | name: httpd_can_network_connect
|
29 | 29 | state: true
|
30 | 30 | persistent: true
|
31 | 31 |
|
32 | 32 | - name: Allow SELinux HTTP network connections
|
33 |
| - seboolean: |
| 33 | + ansible.posix.seboolean: |
34 | 34 | name: httpd_can_network_relay
|
35 | 35 | state: true
|
36 | 36 | persistent: true
|
37 | 37 |
|
38 | 38 | - name: Allow SELinux TCP connections on status ports
|
39 |
| - seport: |
| 39 | + community.general.selinux: |
40 | 40 | ports: "{{ nginx_config_status_port }}"
|
41 | 41 | proto: tcp
|
42 | 42 | setype: http_port_t
|
43 | 43 | state: present
|
44 | 44 | when: nginx_config_status_port is defined
|
45 | 45 |
|
46 | 46 | - name: Allow SELinux TCP connections on Rest API ports
|
47 |
| - seport: |
| 47 | + community.general.selinux: |
48 | 48 | ports: "{{ nginx_config_rest_api_port }}"
|
49 | 49 | proto: tcp
|
50 | 50 | setype: http_port_t
|
51 | 51 | state: present
|
52 | 52 | when: nginx_config_rest_api_port is defined
|
53 | 53 |
|
54 | 54 | - name: Allow SELinux TCP connections on specific ports
|
55 |
| - seport: |
| 55 | + community.general.selinux: |
56 | 56 | ports: "{{ nginx_config_selinux_tcp_ports }}"
|
57 | 57 | proto: tcp
|
58 | 58 | setype: http_port_t
|
59 | 59 | state: present
|
60 | 60 | when: nginx_config_selinux_tcp_ports is defined
|
61 | 61 |
|
62 | 62 | - name: Allow SELinux UDP connections on specific ports
|
63 |
| - seport: |
| 63 | + community.general.selinux: |
64 | 64 | ports: "{{ nginx_config_selinux_udp_ports }}"
|
65 | 65 | proto: udp
|
66 | 66 | setype: http_port_t
|
67 | 67 | state: present
|
68 | 68 | when: nginx_config_selinux_udp_ports is defined
|
69 | 69 |
|
70 | 70 | - name: Set SELinux mode to enforcing
|
71 |
| - selinux: |
| 71 | + ansible.posix.selinux: |
72 | 72 | state: enforcing
|
73 | 73 | policy: targeted
|
74 | 74 | when: nginx_config_selinux_enforcing
|
0 commit comments