diff --git a/tasks/tempest_resources.yml b/tasks/tempest_resources.yml index 307a3d18..4f965aa3 100644 --- a/tasks/tempest_resources.yml +++ b/tasks/tempest_resources.yml @@ -35,17 +35,11 @@ delay: 15 when: tempest_service_available_glance | bool -- name: Store tempest image id - set_fact: - tempest_glance_image_id: "{{ tempest_image_create.id }}" - when: tempest_service_available_glance | bool - # This fact is used in tempest.conf.j2; we set an empty string if it doesn't get # set above to ensure the template will parse correctly. -- name: Store empty tempest_glance_image_id fact +- name: Store tempest image id set_fact: - tempest_glance_image_id: '' - when: not tempest_service_available_glance | bool + tempest_glance_image_id: "{{ tempest_service_available_glance | ternary(tempest_image_create.id, '') }}" - name: Ensure alt tempest image os_image: @@ -60,17 +54,11 @@ register: tempest_image_alt_create when: tempest_service_available_glance | bool -- name: Store alt tempest image id - set_fact: - tempest_glance_image_alt_id: "{{ tempest_image_alt_create.id }}" - when: tempest_service_available_glance | bool - # This fact is used in tempest.conf.j2; we set an empty string if it doesn't get # set above to ensure the template will parse correctly. -- name: Store empty tempest_glance_image_alt_id fact +- name: Store alt tempest image id set_fact: - tempest_glance_image_alt_id: '' - when: not tempest_service_available_glance | bool + tempest_glance_image_alt_id: "{{ tempest_service_available_glance | ternary(tempest_image_alt_create.id, '') }}" - name: Ensure tempest tenants keystone: @@ -207,17 +195,11 @@ register: public_network when: tempest_service_available_neutron | bool -- name: Store neutron public network id - set_fact: - tempest_neutron_public_network_id: "{{ public_network.id }}" - when: tempest_service_available_neutron | bool - # This fact is used in tempest.conf.j2; we set an empty string if it doesn't get # set above to ensure the template will parse correctly. -- name: Store empty tempest_neutron_public_network_id fact +- name: Store neutron public network id set_fact: - tempest_neutron_public_network_id: '' - when: not tempest_service_available_neutron | bool + tempest_neutron_public_network_id: "{{ tempest_service_available_neutron | ternary(public_network.id, '') }}" - name: Ensure private subnet exists os_subnet: