From 0a673e300800b91342499cec9cd482b5d2d9c603 Mon Sep 17 00:00:00 2001 From: binary Date: Tue, 10 Nov 2020 20:46:04 +0100 Subject: Fully working init for alpine vm --- roles/ssh/tasks/main.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'roles/ssh/tasks/main.yml') 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 -- cgit v1.2.3