From b3b0d28eb690c123a9af6a68ba99ed88a0a10b9c Mon Sep 17 00:00:00 2001 From: ZhijunWei Date: Thu, 17 May 2018 14:06:52 +0000 Subject: [PATCH] To avoid creating empty volume for heat 1. when set heat_dev_mode to no, the volume will be empty[0], this ps to avoid creating empty volume. [0]: https://github.com/openstack/kolla-ansible/blob/master/ansible/roles/heat/defaults/main.yml#L13 Change-Id: Id22469442a4713f53646ffec2c5a960722fccb44 --- ansible/roles/heat/tasks/bootstrap_service.yml | 2 +- ansible/roles/heat/tasks/config.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/heat/tasks/bootstrap_service.yml b/ansible/roles/heat/tasks/bootstrap_service.yml index 40e93a9c9c..fcab3e8de2 100644 --- a/ansible/roles/heat/tasks/bootstrap_service.yml +++ b/ansible/roles/heat/tasks/bootstrap_service.yml @@ -20,6 +20,6 @@ BOOTSTRAP: name: "bootstrap_heat" restart_policy: "never" - volumes: "{{ heat_api.volumes }}" + volumes: "{{ heat_api.volumes|reject('equalto', '')|list }}" run_once: True delegate_to: "{{ groups[heat_api.group][0] }}" diff --git a/ansible/roles/heat/tasks/config.yml b/ansible/roles/heat/tasks/config.yml index 13cddf87ae..a72b7698a7 100644 --- a/ansible/roles/heat/tasks/config.yml +++ b/ansible/roles/heat/tasks/config.yml @@ -100,7 +100,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_heat_containers when: - kolla_action != "config"