Allow to distribute custom key with the role
Right now we have quite strong assumption that `nova_ceph_client` should be
present among clients to fetch. At the same time, in case the role is
included outside of the OSA context, ceph_client_filtered_clients might
not contain all users we expect to see.
With that we alter the logic to fetch nova key not only when role is launched
against compute host, but also when the client is present in the list.
Change-Id: I7810881a01b9d2f3d98a6c3ad590b9ea63358011
(cherry picked from commit eb27ca0874
)
This commit is contained in:
parent
5b9b634ba4
commit
609927cb95
|
@ -77,6 +77,7 @@
|
|||
command: virsh secret-get-value {{ nova_ceph_client_uuid }}
|
||||
when:
|
||||
- inventory_hostname in groups.nova_compute
|
||||
- ceph_nova_secret is defined
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
register: libvirt_nova_set
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
stdout: "{{ (ceph_client_keys[nova_ceph_client] | regex_search('.*^\\s*key\\s*=\\s*(.*)$.*', '\\1', multiline=True))[0] }}"
|
||||
when:
|
||||
- inventory_hostname in groups.nova_compute
|
||||
- nova_ceph_client in ceph_client_filtered_clients | map(attribute='name') | list
|
||||
delegate_to: localhost
|
||||
tags:
|
||||
- always
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
command: ceph auth get-key client.{{ nova_ceph_client }} --cluster {{ ceph_cluster_name }}
|
||||
when:
|
||||
- inventory_hostname in groups.nova_compute
|
||||
- nova_ceph_client in ceph_client_filtered_clients | map(attribute='name') | list
|
||||
changed_when: false
|
||||
delegate_to: '{{ ceph_mon_host }}'
|
||||
register: ceph_nova_secret
|
||||
|
|
Loading…
Reference in New Issue