diff --git a/tasks/tempest_resources.yml b/tasks/tempest_resources.yml index b763f49d..1863ac79 100644 --- a/tasks/tempest_resources.yml +++ b/tasks/tempest_resources.yml @@ -13,6 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Ensures you have at least one image to upload + assert: + that: + - "tempest_images | length > 0" + when: + - tempest_service_available_glance | bool + - name: Create deployment-host tempest_image_dir file: path: "{{ tempest_image_dir }}" @@ -70,7 +77,7 @@ - name: Store first tempest image id set_fact: tempest_glance_image_id_1: "{{ tempest_service_available_glance | ternary(tempest_image_create['results'][0]['id'], '') }}" - tempest_glance_image_id_2: "{{ tempest_service_available_glance | ternary(tempest_image_create['results'][1]['id'], '') }}" + tempest_glance_image_id_2: "{{ tempest_service_available_glance | ternary(tempest_image_create['results'][-1]['id'], '') }}" - name: Ensure tempest tenants keystone: