Clean up glance before moving the workload guest images to glance
When the browbeat playbook is run with workloads enabled, new images will be created for the workloads and moved to glance. When the playbook is rerun, it fails because the image already exists in the same name in glance. So we need to clean up the old workload images in glance(if they exist) so the new ones are moved to glance without any errors. Change-Id: I766143c4f329a600405c705d29252fee7d22bd8c
This commit is contained in:
parent
ab77b57b49
commit
ec8a262fa6
@ -22,6 +22,11 @@
|
||||
retries: 10
|
||||
with_items: "{{ workload_ids.results }}"
|
||||
|
||||
- name: Clean up glance
|
||||
shell: source {{ overcloudrc }} ; openstack image delete {{ browbeat_workloads[item].name }}
|
||||
with_items: "{{ browbeat_workloads }}"
|
||||
ignore_errors: true
|
||||
|
||||
- name: Copy prepared workload guest into Glance
|
||||
shell: source {{ overcloudrc }} ; openstack server image create --wait --name {{ browbeat_workloads[item].name }} {{ browbeat_workloads[item].name }}
|
||||
with_items: "{{ browbeat_workloads }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user