diff --git a/roles/system/sshd/tasks/main.yml b/roles/system/sshd/tasks/main.yml index 5664f76..d7876a6 100644 --- a/roles/system/sshd/tasks/main.yml +++ b/roles/system/sshd/tasks/main.yml @@ -27,6 +27,14 @@ group: root notify: "Restart SSH server" +- name: Notify SELinux about new port + community.general.seport: + ports: "{{ system_sshd_port }}" + proto: "tcp" + setype: "ssh_port_t" + state: "present" + when: ansible_facts.selinux.status == 'enabled' + - name: Set trusted CA ansible.builtin.include_tasks: trusted_ca.yml when: system_sshd_auth_trusted_ca