mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-12-01 15:00:19 +01:00
17 lines
489 B
YAML
17 lines
489 B
YAML
|
---
|
||
|
- name: Ensure the custom ports are configured in selinux
|
||
|
ansible.builtin.include_role:
|
||
|
name: fedora.linux_system_roles.selinux
|
||
|
vars:
|
||
|
selinux_ports:
|
||
|
- ports: "{{ sshd_item }}"
|
||
|
proto: tcp
|
||
|
setype: ssh_port_t
|
||
|
state: present
|
||
|
local: true
|
||
|
loop: "{{ __sshd_ports_from_config | from_json | d([]) }}"
|
||
|
loop_control:
|
||
|
loop_var: sshd_item # avoid conflicts with the selinux loops
|
||
|
when:
|
||
|
- __sshd_ports_from_config | from_json != [22]
|