Skip to content

Commit

Permalink
Merge pull request #650 from openstack-k8s-operators/ssh-keyscan-on-p…
Browse files Browse the repository at this point in the history
…re-play

Move ssh-keyscan to zuul pre playbook
  • Loading branch information
openshift-ci[bot] authored Oct 12, 2023
2 parents 3390396 + 90eb2bd commit 0d5c058
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
13 changes: 13 additions & 0 deletions ci/playbooks/multinode-customizations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ''
Expand Down
18 changes: 0 additions & 18 deletions ci_framework/hooks/playbooks/fetch_compute_facts.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 0d5c058

Please sign in to comment.