diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2021-12-05 19:58:05 +0000 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2021-12-05 21:03:22 +0000 |
commit | 4e542a8e15596421a9120cf700f0d4d12dbf6688 (patch) | |
tree | b7cd1c2c87acd27760110bf3b9534d7f159f0a7d /roles/sshd/tasks/main.yml | |
parent | 1f21f49f197d6f189952f6e7b1a0a21ebb86487b (diff) | |
download | rules-4e542a8e15596421a9120cf700f0d4d12dbf6688.tar.gz |
roles: Add sshd role for configuration generation
Diffstat (limited to 'roles/sshd/tasks/main.yml')
-rw-r--r-- | roles/sshd/tasks/main.yml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/roles/sshd/tasks/main.yml b/roles/sshd/tasks/main.yml new file mode 100644 index 0000000..f9131e9 --- /dev/null +++ b/roles/sshd/tasks/main.yml @@ -0,0 +1,19 @@ +- name: generate sshd configuration + template: + src: sshd_config.j2 + dest: /etc/ssh/sshd_config + owner: 0 + group: 0 + mode: 0644 + +- name: enabled and restart sshd + service: + name: sshd + state: restarted + enabled: true + +- name: check ssh connection + wait_for: + port: 22 + delay: 1 + state: started |