# ssh ~~ tasks/main.yml --- - name: Generate sshd configuration template: src: templates/sshd_config.j2 dest: /etc/ssh/sshd_config owner: root group: "{{ group_root }}" mode: "0644" - name: Restart sshd service: name: sshd state: restarted - name: Check ssh connection wait_for: port: 22 delay: 1 state: started