diff --git a/playbooks/setup/server/natsuco.yaml b/playbooks/setup/server/natsuco.yaml index c22fa88..f4170a0 100644 --- a/playbooks/setup/server/natsuco.yaml +++ b/playbooks/setup/server/natsuco.yaml @@ -20,4 +20,7 @@ state: present name: policycoreutils-python-utils - name: give sshd access to alt port on selinux - command: "/usr/sbin/semanage port -a -t ssh_port_t -p tcp {{ alt_ssh_port }}" + register: result_change_to_alt_port + ignore_errors: true + changed_when: "'already defined' not in result_change_to_alt_port.stdout" + command: semanage port -a -t ssh_port_t -p tcp {{ alt_ssh_port }}