Fix facts gathering for "from files" scenario
delegate_facts should be used as futher we're asking these facts from
localhost, while they will be assigned to original host.
Also _keys are supposed to be dict, but defined as list and `client`
is expected instead of `item`
Change-Id: I719016f454427fcc751d872408c44d665278a0d0
Closes-Bug: 1860572
(cherry picked from commit 028ec5225d
)
This commit is contained in:
parent
451c57a489
commit
3389e7a29c
|
@ -18,15 +18,16 @@
|
|||
- name: From files | Retrieve keyrings for openstack clients
|
||||
set_fact:
|
||||
ceph_client_keys: |-
|
||||
{% set _keys = [] %}
|
||||
{% set _keys = {} %}
|
||||
{% for client in ceph_client_filtered_clients %}
|
||||
{% set _ = _keys.update({
|
||||
client: lookup('file', ceph_keyrings_dir ~ '/' ~ item ~ '.keyring')
|
||||
client: lookup('file', ceph_keyrings_dir ~ '/' ~ client ~ '.keyring')
|
||||
})
|
||||
%}
|
||||
{% endfor %}
|
||||
{{ _keys }}
|
||||
changed_when: false
|
||||
delegate_facts: True
|
||||
delegate_to: localhost
|
||||
tags:
|
||||
- ceph-config
|
||||
|
|
Loading…
Reference in New Issue