Fix external ceph cinder keyring

Change from file to template

Closes-Bug: #2089229
Change-Id: I7cbc6a94608baf4f04ef231cc88397fc5dcf0a9b
This commit is contained in:
Christian Schilling 2024-11-21 09:51:53 +01:00
parent b8acc5de1c
commit f30dd3e52e
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>`__