Merge "Fix external ceph cinder keyring"

This commit is contained in:
Zuul 2024-11-26 16:01:52 +00:00 committed by Gerrit Code Review
commit c717675498
2 changed files with 11 additions and 1 deletions

View File

@ -41,7 +41,7 @@
- name: Extract cinder key from file
set_fact:
cinder_cephx_raw_key:
"{{ lookup('file', cinder_cephx_keyring_file.stat.path) | regex_search('key\\s*=.*$', multiline=True) | regex_replace('key\\s*=\\s*(.*)\\s*', '\\1') }}"
"{{ lookup('template', cinder_cephx_keyring_file.stat.path) | regex_search('key\\s*=.*$', multiline=True) | regex_replace('key\\s*=\\s*(.*)\\s*', '\\1') }}"
changed_when: false
when:
- cinder_backend_ceph | bool

View File

@ -0,0 +1,10 @@
---
fixes:
- |
Fixes external ceph cinder keyring is not imported into libvirt if
templated.
Per now, ansible/roles/nova-cell/tasks/external_ceph.yml looks
cinder_cephx_raw_key up as file from cinder_cephx_keyring_file.stat.path
To allow templated cinderkeyrings, the lookup is changed to "template"
Fixes `LP#2089229
<https://bugs.launchpad.net/kolla-ansible/+bug/2089229>`__