Merge "Multi-node: Streamline multi-node-known-hosts"
This commit is contained in:
commit
5caca4c6f2
@ -1,3 +1,9 @@
|
||||
- name: Setup known_hosts for cross-node SSH'ing when we have more than 1 host
|
||||
include: setup-multinode-known-hosts.yaml
|
||||
when: hostvars|length > 1
|
||||
- name: Get known_hosts facts
|
||||
generate_all_known_hosts:
|
||||
hostvars: "{{ hostvars }}"
|
||||
|
||||
- name: add known_host record for every public key of every other ip, hostname
|
||||
known_hosts:
|
||||
name: "{{ item.name }}"
|
||||
key: "{{ item.key }}"
|
||||
with_items: "{{ all_known_hosts }}"
|
||||
|
@ -1,10 +0,0 @@
|
||||
- name: Get known_hosts facts
|
||||
generate_all_known_hosts:
|
||||
hostvars: "{{ hostvars }}"
|
||||
|
||||
- name: add known_host record for every public key of every other ip, hostname
|
||||
known_hosts:
|
||||
name: "{{ item.name }}"
|
||||
key: "{{ item.key }}"
|
||||
with_items:
|
||||
"{{ all_known_hosts }}"
|
Loading…
x
Reference in New Issue
Block a user