mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-12-23 09:00:19 +01:00
16 lines
489 B
YAML
16 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]
|