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