From 75b32e60aad2bc2d8d1746be1dbc6d6bf422592e Mon Sep 17 00:00:00 2001 From: binary Date: Thu, 19 Nov 2020 14:13:28 +0100 Subject: Move roles functionnality in sub-roles --- roles/sshd/tasks/main.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 roles/sshd/tasks/main.yml (limited to 'roles/sshd/tasks') diff --git a/roles/sshd/tasks/main.yml b/roles/sshd/tasks/main.yml new file mode 100644 index 0000000..0969429 --- /dev/null +++ b/roles/sshd/tasks/main.yml @@ -0,0 +1,24 @@ + +# 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: "{{ user_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