Browse Source

save to home ssh_known_host keys

master
Markus Katharina Brechtel 7 years ago
parent
commit
d3c7af2589
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      tasks/file.yml

+ 2
- 1
tasks/file.yml View File

@@ -3,8 +3,9 @@
- name: write ssh_known_hosts file
local_action: known_hosts
args:
path: "{{ playbook_dir }}/ssh_known_hosts"
path: "{{ lookup('env','HOME') }}/.ssh/known_hosts"
name: "{{ item }}"
key: "{{ lookup('template','ssh_host_key.j2') }}"
with_items: "{{play_hosts}}"
when: hostvars[item].ssh_host_key_ed25519_public is defined
run_once: true

Loading…
Cancel
Save