From d26fe55aa9de5f0eb51152c22d12ff28a9c488d4 Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing Date: Thu, 27 Feb 2020 14:44:24 +0100 Subject: space_server: use common secrets.yml in ansible root ..and generalize and move sshd tasks to fedora role. --- roles/debian/tasks/sshd.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'roles/debian') diff --git a/roles/debian/tasks/sshd.yml b/roles/debian/tasks/sshd.yml index 4c257fe..c342604 100644 --- a/roles/debian/tasks/sshd.yml +++ b/roles/debian/tasks/sshd.yml @@ -6,10 +6,10 @@ owner: root group: ssh_keys mode: 0640 - with_dict: '{{ ssh_host_keys }}' + with_dict: '{{ ssh_host_keys[hostname] }}' loop_control: label: '/etc/ssh/{{ item.key }}' - when: ssh_host_keys is defined + when: ssh_host_keys is defined and hostname in ssh_host_keys - name: Create public host keys copy: @@ -18,10 +18,10 @@ owner: root group: root mode: 0644 - with_dict: '{{ ssh_host_keys }}' + with_dict: '{{ ssh_host_keys[hostname] }}' loop_control: label: '/etc/ssh/{{ item.key }}.pub' - when: ssh_host_keys is defined + when: ssh_host_keys is defined and hostname in ssh_host_keys - name: Configure SSH daemon lineinfile: -- cgit v1.2.1