diff --git a/ansible/roles/nova-cell/tasks/external_ceph.yml b/ansible/roles/nova-cell/tasks/external_ceph.yml index fdf1aa6b80..30a6799767 100644 --- a/ansible/roles/nova-cell/tasks/external_ceph.yml +++ b/ansible/roles/nova-cell/tasks/external_ceph.yml @@ -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 diff --git a/releasenotes/notes/external-ceph-cinder_key-1a4c38fff3e2ab3c.yaml b/releasenotes/notes/external-ceph-cinder_key-1a4c38fff3e2ab3c.yaml new file mode 100644 index 0000000000..bcdd4f39b1 --- /dev/null +++ b/releasenotes/notes/external-ceph-cinder_key-1a4c38fff3e2ab3c.yaml @@ -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 + `__