Skip to content

Commit

Permalink
Configure backends from API host
Browse files Browse the repository at this point in the history
The tasks to configure cinder backends require that the API be
available. Since the API service should be installed after the volume
service, run these tasks against an API host instead of a volume host.

Change-Id: I6f39b4da6d4d8a3768f157c73970fe0177885ff3
  • Loading branch information
jimmymccrory committed Dec 19, 2017
1 parent 198acc0 commit 6c976e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tasks/cinder_backends.yml
Expand Up @@ -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: |
Expand Down
6 changes: 3 additions & 3 deletions tasks/main.yml
Expand Up @@ -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

Expand Down

0 comments on commit 6c976e5

Please sign in to comment.