fa1331e4a7
This removes redundant ssh known hosts prep in the multi-node-known-hosts role as we've seen these tasks take significant amounts of time due to the high cost of ansible looping. According to the change [0] that added the system wide known_hosts setting this was not originally done to avoid breaking testing in openstack-zuul-jobs. Since then those tests have been moved to zuul-jobs [1] and I've updated them with this change. This should cut the time to run this role by about half. [0] https://review.opendev.org/c/zuul/zuul-jobs/+/548642 [1] https://review.opendev.org/c/zuul/zuul-jobs/+/668767 Change-Id: I90492bbb5ae15fd3b36a54071c4eef891f53b405
14 lines
376 B
YAML
14 lines
376 B
YAML
- name: Get known_hosts facts
|
|
generate_all_known_hosts:
|
|
hostvars: "{{ hostvars }}"
|
|
|
|
- name: add default known_host record for every user
|
|
become: true
|
|
known_hosts:
|
|
name: "{{ zj_known_host.name }}"
|
|
key: "{{ zj_known_host.key }}"
|
|
path: /etc/ssh/ssh_known_hosts
|
|
with_items: "{{ ansible_facts.all_known_hosts }}"
|
|
loop_control:
|
|
loop_var: zj_known_host
|