From 0df015e9b5c4aefd4245c94ee98021d2af80ed99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Sat, 22 Oct 2022 16:41:45 +0200 Subject: lint: pass ansible-lint + yamllint --- roles/sshd/tasks/main.yml | 8 ++++---- roles/sshd/tasks/synchronize_keys.yml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'roles/sshd') diff --git a/roles/sshd/tasks/main.yml b/roles/sshd/tasks/main.yml index f1af386..d9d14ff 100644 --- a/roles/sshd/tasks/main.yml +++ b/roles/sshd/tasks/main.yml @@ -1,5 +1,5 @@ - name: generate sshd configuration - template: + ansible.builtin.template: src: sshd_config.j2 dest: /etc/ssh/sshd_config owner: 0 @@ -7,16 +7,16 @@ mode: 0644 - name: include key synchronization tasks - include_tasks: synchronize_keys.yml + ansible.builtin.include_tasks: synchronize_keys.yml - name: enable and restart sshd - service: + ansible.builtin.service: name: sshd state: restarted enabled: true - name: check ssh connection - wait_for: + ansible.builtin.wait_for: port: "{{ ansible_port }}" delay: 1 state: started diff --git a/roles/sshd/tasks/synchronize_keys.yml b/roles/sshd/tasks/synchronize_keys.yml index 722fdfa..16c437c 100644 --- a/roles/sshd/tasks/synchronize_keys.yml +++ b/roles/sshd/tasks/synchronize_keys.yml @@ -1,5 +1,5 @@ - name: get ssh keys for all users - find: + ansible.builtin.find: paths: files/keys file_type: link recurse: true @@ -8,7 +8,7 @@ register: result - name: synchronize ssh keys - authorized_key: + ansible.posix.authorized_key: user: "{{ item.path | dirname | basename }}" state: present key: "{{ lookup('file', item.path) }}" -- cgit v1.2.3