diff --git a/ci/playbooks/multinode-customizations.yml b/ci/playbooks/multinode-customizations.yml index 01b8f430d0..a6c6ea9532 100644 --- a/ci/playbooks/multinode-customizations.yml +++ b/ci/playbooks/multinode-customizations.yml @@ -102,6 +102,19 @@ - make state: present + - name: Ensure we know compute host keys + ansible.builtin.shell: + cmd: | + ssh-keyscan {{ hostvars[item].ansible_host }} >> ~/.ssh/known_hosts + loop: >- + {{ + hostvars | dict2items | + selectattr("value.ansible_host", "defined") | + map(attribute="key") + }} + loop_control: + label: "{{ item }}" + - name: Generate an ssh keypair ansible.builtin.command: cmd: ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -P '' diff --git a/ci_framework/hooks/playbooks/fetch_compute_facts.yml b/ci_framework/hooks/playbooks/fetch_compute_facts.yml index 73a06bcc11..0a8571b899 100644 --- a/ci_framework/hooks/playbooks/fetch_compute_facts.yml +++ b/ci_framework/hooks/playbooks/fetch_compute_facts.yml @@ -1,22 +1,4 @@ --- -- name: Gather ssh host keys hook - hosts: localhost - gather_facts: false - connection: local - tasks: - - name: Ensure we know compute host keys - ansible.builtin.shell: - cmd: | - ssh-keyscan {{ hostvars[item].ansible_host }} >> ~/.ssh/known_hosts - loop: >- - {{ - hostvars | dict2items | - selectattr("value.ansible_host", "defined") | - map(attribute="key") - }} - loop_control: - label: "{{ item }}" - - name: Push repositories hook hosts: all,!crcs,!crc gather_facts: true