--- - name: Copy conf ansible.builtin.template: src: "{{ item.src }}" dest: "{{ item.dest }}" group: root mode: u=rwx,g=rx,o=rx loop: - { src: 'port.conf', dest: '/etc/ssh/sshd_config.d/99-port.conf' } register: iptables_templates_results become: yes # TODO: Reload ssh configuration and reconnect to new port