Simplify nova_cinder_rbd_inuse set fact
Removes the obsolete jinja loop in favor of the newer style map-extract ansible filter. Change-Id: Ia1d02070be2d5ab89e5ef51d96773395516d0c8d
This commit is contained in:
parent
c8862e4d8f
commit
27accd67e4
@ -29,14 +29,7 @@
|
||||
# instances can function when RBD is the volume backend.
|
||||
- name: Set cinder RBD inuse fact
|
||||
set_fact:
|
||||
nova_cinder_rbd_inuse: |-
|
||||
{% set _var = False %}
|
||||
{% for host in groups['cinder_volume'] %}
|
||||
{% if hostvars[host]['cinder_backend_rbd_inuse'] | bool %}
|
||||
{% set _var = True %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{{ _var }}
|
||||
nova_cinder_rbd_inuse: "{{ True in groups['cinder_volume'] | map('extract', hostvars, 'cinder_backend_rbd_inuse') }}"
|
||||
delegate_to: localhost
|
||||
delegate_facts: True
|
||||
when:
|
||||
|
Loading…
x
Reference in New Issue
Block a user