Skip to content
Snippets Groups Projects
Commit 1822d489 authored by caoyuan's avatar caoyuan
Browse files

Avoid creating an empty volume

Avoid creating an empty volume[0] when not use dev mode
for glance.

[0]: https://github.com/openstack/kolla-ansible/blob/master/ansible/roles/glance/defaults/main.yml#L14

Change-Id: Ib27489abe20fb562acbc28263f7680e39d9dab44
parent 1bdb98e9
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@
common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}"
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
when:
- action != "config"
- inventory_hostname in glance_api_hosts
......@@ -36,7 +36,7 @@
common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}"
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
when:
- action != "config"
- inventory_hostname in groups[service.group]
......
......@@ -31,7 +31,7 @@
BOOTSTRAP:
name: "bootstrap_glance"
restart_policy: "never"
volumes: "{{ glance_api.volumes }}"
volumes: "{{ glance_api.volumes|reject('equalto', '')|list }}"
run_once: True
delegate_to: "{{ groups[glance_api.group][0] }}"
......
......@@ -117,7 +117,7 @@
common_options: "{{ docker_common_options }}"
name: "{{ item.value.container_name }}"
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes }}"
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
register: check_glance_containers
when:
- action != "config"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment