From 673d14dc4636057604790dbb85d11bc44fefcc2f Mon Sep 17 00:00:00 2001 From: Seunghun Lee Date: Fri, 22 May 2026 13:17:10 +0100 Subject: [PATCH 1/2] Fix ansible-collection-kolla not getting installed When ``ansible-galaxy collection install`` is called with two requirements files, only the latter one is registered and dependencies on the first requirements file are ignored. Fixing by performing two separate ansible-galaxy installation. One for core collections (Defined at file path ``kolla_ansible_core_requirements_yml``) and another for additional collections (Defined at file path ``kolla_ansible_requirements_yml``). Closes-Bug: #2153994 Change-Id: Ie179ac46c28c08f3ed41922485ef2e532a2d6e46 Signed-off-by: Seunghun Lee (cherry picked from commit 19fe0d493ea6505b36f2abeddb46f2c5e756fe30) --- ansible/roles/kolla-ansible/tasks/install.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ansible/roles/kolla-ansible/tasks/install.yml b/ansible/roles/kolla-ansible/tasks/install.yml index fb0662745..785d375a3 100644 --- a/ansible/roles/kolla-ansible/tasks/install.yml +++ b/ansible/roles/kolla-ansible/tasks/install.yml @@ -105,6 +105,20 @@ virtualenv: "{{ kolla_ansible_venv }}" virtualenv_python: "{{ kolla_ansible_venv_python }}" +- name: Ensure core Ansible collections are installed + command: + cmd: >- + ansible-galaxy collection install --force + -r {{ kolla_ansible_core_requirements_yml }} + -p {{ kolla_ansible_venv }}/share/kolla-ansible/ansible/collections/ + environment: + # NOTE(wszumski): Ignore collections shipped with ansible, so that we can install + # newer versions. + ANSIBLE_COLLECTIONS_SCAN_SYS_PATH: "False" + # NOTE(wszumski): Don't use path configured for kayobe + ANSIBLE_COLLECTIONS_PATH: '' + when: not kolla_ansible_venv_ansible + - name: Ensure Ansible collections are installed command: cmd: >- From 853481b459bc245618da782e26afef9c0dd604fb Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Fri, 29 May 2026 18:22:06 +0200 Subject: [PATCH 2/2] Fix known_hosts module issue on Rocky Linux 9.8 The known_hosts module returns a failure on Rocky Linux 9.8 when given a comment line from ssh-keyscan output. Fix by excluding them with grep. Depends-On: https://review.opendev.org/c/openstack/tenks/+/990686 Change-Id: I29e7e8a7480009fd359b8aa8b867b11900109f00 Signed-off-by: Pierre Riteau (cherry picked from commit e30333940f6215740b22f987a50ad191e876b7d2) --- ansible/roles/bootstrap/tasks/main.yml | 4 +++- ansible/roles/ssh-known-host/tasks/main.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ansible/roles/bootstrap/tasks/main.yml b/ansible/roles/bootstrap/tasks/main.yml index aaf5abc7d..70e1dcf48 100644 --- a/ansible/roles/bootstrap/tasks/main.yml +++ b/ansible/roles/bootstrap/tasks/main.yml @@ -26,8 +26,10 @@ user: "{{ ansible_facts.user_id }}" key: "{{ lookup('file', bootstrap_ssh_private_key_path ~ '.pub') }}" +# NOTE(priteau): Exclude comments from ssh-keyscan output because they break +# known_hosts on Rocky Linux 9.8. - name: Scan for SSH keys - command: ssh-keyscan {{ item }} + shell: ssh-keyscan {{ item }} | grep -v '^#' with_items: - localhost - 127.0.0.1 diff --git a/ansible/roles/ssh-known-host/tasks/main.yml b/ansible/roles/ssh-known-host/tasks/main.yml index 2cb8cc49e..d9274b402 100644 --- a/ansible/roles/ssh-known-host/tasks/main.yml +++ b/ansible/roles/ssh-known-host/tasks/main.yml @@ -13,9 +13,11 @@ vm provision' and 'kayobe overcloud inventory discover'. when: not ansible_host | default(inventory_hostname) +# NOTE(priteau): Exclude comments from ssh-keyscan output because they break +# known_hosts on Rocky Linux 9.8. - name: Scan for SSH keys local_action: - module: command ssh-keyscan {{ item }} + module: shell ssh-keyscan {{ item }} | grep -v '^#' with_items: - "{{ ansible_host|default(inventory_hostname) }}" register: keyscan_result