diff --git a/roles/multi-node-known-hosts/tasks/main.yaml b/roles/multi-node-known-hosts/tasks/main.yaml index 077431b40..4f7b7cf8b 100644 --- a/roles/multi-node-known-hosts/tasks/main.yaml +++ b/roles/multi-node-known-hosts/tasks/main.yaml @@ -2,14 +2,6 @@ generate_all_known_hosts: hostvars: "{{ hostvars }}" -- name: add known_host record for every public key of every other ip, hostname for ansible_user - known_hosts: - name: "{{ zj_known_host.name }}" - key: "{{ zj_known_host.key }}" - with_items: "{{ ansible_facts.all_known_hosts }}" - loop_control: - loop_var: zj_known_host - - name: add default known_host record for every user become: true known_hosts: diff --git a/test-playbooks/multinode/multi-node-known-hosts.yaml b/test-playbooks/multinode/multi-node-known-hosts.yaml index 197bdffc2..cc19aa6bc 100644 --- a/test-playbooks/multinode/multi-node-known-hosts.yaml +++ b/test-playbooks/multinode/multi-node-known-hosts.yaml @@ -4,7 +4,7 @@ - multi-node-known-hosts post_tasks: - name: lookup known_hosts file - command: cat ~/.ssh/known_hosts + command: cat /etc/ssh/ssh_known_hosts register: known_hosts - name: Set up host addresses