Merge "Fix updating amphora images"
This commit is contained in:
commit
e09ff0b5cc
@ -43,9 +43,19 @@
|
|||||||
when:
|
when:
|
||||||
- octavia_download_artefact | bool
|
- octavia_download_artefact | bool
|
||||||
|
|
||||||
|
- name: Replace existing image with new one
|
||||||
|
when:
|
||||||
|
- octavia_download_result | changed
|
||||||
|
block:
|
||||||
- name: Get current image id
|
- name: Get current image id
|
||||||
os_image_facts:
|
os_image_facts:
|
||||||
cloud: default
|
auth:
|
||||||
|
auth_url: "{{ keystone_service_adminurl }}"
|
||||||
|
username: "{{ octavia_service_user_name }}"
|
||||||
|
password: "{{ octavia_service_password }}"
|
||||||
|
project_name: "{{ octavia_service_project_name }}"
|
||||||
|
user_domain_name: "{{ octavia_service_user_domain_id }}"
|
||||||
|
project_domain_name: "{{ octavia_service_project_domain_id }}"
|
||||||
region_name: "{{ octavia_service_region }}"
|
region_name: "{{ octavia_service_region }}"
|
||||||
image: amphora-x64-haproxy
|
image: amphora-x64-haproxy
|
||||||
interface: admin
|
interface: admin
|
||||||
@ -54,8 +64,6 @@
|
|||||||
until: get_image_facts is success
|
until: get_image_facts is success
|
||||||
retries: 5
|
retries: 5
|
||||||
delay: 10
|
delay: 10
|
||||||
when:
|
|
||||||
- octavia_download_result | changed
|
|
||||||
|
|
||||||
# This uses command since os_image doesn't support tags.
|
# This uses command since os_image doesn't support tags.
|
||||||
# TODO(odyssey4me):
|
# TODO(odyssey4me):
|
||||||
@ -70,15 +78,19 @@
|
|||||||
--private
|
--private
|
||||||
--project service
|
--project service
|
||||||
amphora-x64-haproxy
|
amphora-x64-haproxy
|
||||||
when:
|
|
||||||
- octavia_download_result | changed
|
|
||||||
|
|
||||||
- name: Delete old image from glance
|
- name: Delete old image from glance
|
||||||
os_image:
|
os_image:
|
||||||
cloud: default
|
auth:
|
||||||
|
auth_url: "{{ keystone_service_adminurl }}"
|
||||||
|
username: "{{ octavia_service_user_name }}"
|
||||||
|
password: "{{ octavia_service_password }}"
|
||||||
|
project_name: "{{ octavia_service_project_name }}"
|
||||||
|
user_domain_name: "{{ octavia_service_user_domain_id }}"
|
||||||
|
project_domain_name: "{{ octavia_service_project_domain_id }}"
|
||||||
state: absent
|
state: absent
|
||||||
region_name: "{{ octavia_service_region }}"
|
region_name: "{{ octavia_service_region }}"
|
||||||
id: "{{ openstack.id }}"
|
name: "{{ openstack_image.id }}"
|
||||||
interface: admin
|
interface: admin
|
||||||
verify: "{{ not keystone_service_adminuri_insecure }}"
|
verify: "{{ not keystone_service_adminuri_insecure }}"
|
||||||
register: remove_old_image
|
register: remove_old_image
|
||||||
@ -86,4 +98,4 @@
|
|||||||
retries: 5
|
retries: 5
|
||||||
delay: 10
|
delay: 10
|
||||||
when:
|
when:
|
||||||
- openstack is defined # result from os_image_facts
|
- openstack_image.id is defined
|
||||||
|
Loading…
x
Reference in New Issue
Block a user