# sshd ~~ roles/sshd/tasks/main.yml # Create sshd configuration and restart daemon --- - name: generate sshd configuration template: src: templates/sshd_config.j2 dest: /etc/ssh/sshd_config owner: "0" group: "0" mode: "0644" - name: synchronize keys include_tasks: sync_keys.yml - name: restart sshd service: name: sshd state: restarted - name: check ssh connection wait_for: port: 22 delay: 1 state: started