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