From b710872b20a7bf8ec10fce141bc20c911ad7d535 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Fri, 2 Sep 2022 14:53:05 +0200 Subject: [PATCH] common: fix style --- roles/common/handlers/main.yml | 9 +++------ roles/common/tasks/Debian.yml | 14 ++++++-------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/roles/common/handlers/main.yml b/roles/common/handlers/main.yml index 29f8c33..a629f26 100644 --- a/roles/common/handlers/main.yml +++ b/roles/common/handlers/main.yml @@ -6,14 +6,11 @@ - name: Restart journald service: name=systemd-journald state=restarted +- name: Restart sshd + service: name=sshd state=restarted + - name: update-grub command: update-grub - name: update-initramfs command: update-initramfs -u -k all - -- name: restart sshd - service: - name: sshd - state: restarted - listen: "restart sshd" diff --git a/roles/common/tasks/Debian.yml b/roles/common/tasks/Debian.yml index 1add3e0..bd6cf07 100644 --- a/roles/common/tasks/Debian.yml +++ b/roles/common/tasks/Debian.yml @@ -102,14 +102,12 @@ regexp: "rotate [0-9]+" replace: "rotate 7" loop: "{{ logrotateconfigpaths }}" - -- name: copy files/configs - template: - src: "{{ item.src }}" - dest: "{{ item.dest }}" + +- name: Configure ssh password login + template: + src: sshd_config.j2 + dest: /etc/ssh/sshd_config owner: root group: root mode: '0644' - with_items: - - { src: 'sshd_config.j2', dest: '/etc/ssh/sshd_config' } - notify: "restart sshd" + notify: Restart sshd