zuul-jobs/roles/multi-node-known-hosts/tasks/setup-multinode-known-hosts.yaml
Clint Byrum cc2ed9fa5f Add known_hosts generation for multiple nodes
Things will need to be done a bit differently for localhost-ssh, so this
is just for the case of multiple nodes needing to be able to SSH to
eachother.

Change-Id: I941cf3de7691ee1b5277ca50c7bb9daa5b9a0732
2017-08-22 13:56:16 -07:00

11 lines
280 B
YAML

- 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 }}"