aboutsummaryrefslogtreecommitdiffstats
path: root/roles/ssh/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/ssh/tasks/main.yml')
-rw-r--r--roles/ssh/tasks/main.yml19
1 files changed, 18 insertions, 1 deletions
diff --git a/roles/ssh/tasks/main.yml b/roles/ssh/tasks/main.yml
index 38300df..0fc2dee 100644
--- a/roles/ssh/tasks/main.yml
+++ b/roles/ssh/tasks/main.yml
@@ -3,4 +3,21 @@
---
-- include: generate_dns.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
remember that computers suck.