From d807e722f26f31f4794d972133b0b0737a13acc3 Mon Sep 17 00:00:00 2001 From: akrzos Date: Thu, 26 Jan 2017 15:33:35 -0500 Subject: [PATCH] Update image upload to use OpenStack Unified Client Ocata chokes on using the glance client due to the OS_TENANT_NAME environment variable missing from overcloudrc. This supports both Newton and Ocata. Change-Id: Ib7ced813b10002be43a50042acb623cc7b2af0bc --- ansible/install/roles/browbeat/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/install/roles/browbeat/tasks/main.yml b/ansible/install/roles/browbeat/tasks/main.yml index 55db74430..792850e6b 100644 --- a/ansible/install/roles/browbeat/tasks/main.yml +++ b/ansible/install/roles/browbeat/tasks/main.yml @@ -303,7 +303,7 @@ with_items: "{{ images }}" - name: Determine if image exists - shell: . {{ overcloudrc }}; glance image-list | grep '{{ item }}' + shell: . {{ overcloudrc }}; openstack image list | grep '{{ item }}' register: image_exists ignore_errors: true changed_when: false @@ -316,8 +316,8 @@ - "{{ images }}" - "{{ image_exists.results }}" -- name: Upload image into cloud (Liberty and >Liberty versions) - shell: . {{ overcloudrc }}; glance image-create --name {{ item }} --visibility public --disk-format=qcow2 --container-format=bare < {{ home_dir }}/{{ item }} +- name: Upload image into cloud (Newton and Ocata versions) + shell: . {{ overcloudrc }}; openstack image create --public --disk-format=qcow2 --container-format=bare {{ item }} < {{ home_dir }}/{{ item }} ignore_errors: true with_items: "{{ images }}"