Merge "Configure backends from API host"

This commit is contained in:
Zuul 2017-12-20 18:02:41 +00:00 committed by Gerrit Code Review
commit f807cdccfb
2 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@
- name: Create singular cinder_backends variable for all hosts
set_fact:
_cinder_backends: "{{ (_cinder_backends | default(cinder_backends | default({}))) | combine(hostvars[item]['cinder_backends'] | default({})) }}"
with_items: "{{ groups['cinder_volume'] }}"
with_items: "{{ groups[cinder_services['cinder-volume']['group']] }}"
- name: Add in cinder devices types
shell: |

View File

@ -94,9 +94,9 @@
- include: cinder_backends.yml
static: no
when:
- "groups['cinder_volume'] | length > 0"
- "cinder_services['cinder-volume']['group'] in group_names"
- "inventory_hostname == ((groups['cinder_volume'] | intersect(ansible_play_hosts)) | list)[0]"
- "groups[cinder_services['cinder-volume']['group']] | length > 0"
- "cinder_services['cinder-api']['group'] in group_names"
- "inventory_hostname == ((groups[cinder_services['cinder-api']['group']] | intersect(ansible_play_hosts)) | list)[0]"
tags:
- cinder-config