aboutsummaryrefslogtreecommitdiffstats
path: root/roles/ssh/tasks
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2020-11-10 20:46:04 +0100
committerbinary <me@rgoncalves.se>2020-11-10 20:46:04 +0100
commit0a673e300800b91342499cec9cd482b5d2d9c603 (patch)
tree752309b2f30928063340afefe39682679491a451 /roles/ssh/tasks
parent89c7516b1f9ec4ce7ce2947f98f2070c242f4459 (diff)
downloadinfrastructure-0a673e300800b91342499cec9cd482b5d2d9c603.tar.gz
Fully working init for alpine vm
Diffstat (limited to 'roles/ssh/tasks')
-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.