1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
# 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