aboutsummaryrefslogtreecommitdiffstats
path: root/roles/debian/tasks
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@labitat.dk>2020-02-27 14:44:24 +0100
committerEmil Renner Berthing <esmil@labitat.dk>2020-02-27 17:45:04 +0100
commitd26fe55aa9de5f0eb51152c22d12ff28a9c488d4 (patch)
tree04501e2a33ec62cd07e4e55efd1a4ab411abc578 /roles/debian/tasks
parent4115d711842ea235966868a325f5d42ee428db14 (diff)
downloadlabitat-ansible-d26fe55aa9de5f0eb51152c22d12ff28a9c488d4.tar.gz
labitat-ansible-d26fe55aa9de5f0eb51152c22d12ff28a9c488d4.tar.xz
labitat-ansible-d26fe55aa9de5f0eb51152c22d12ff28a9c488d4.zip
space_server: use common secrets.yml in ansible root
..and generalize and move sshd tasks to fedora role.
Diffstat (limited to 'roles/debian/tasks')
-rw-r--r--roles/debian/tasks/sshd.yml8
1 files changed, 4 insertions, 4 deletions
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: