tripleo-ha-utils/roles/validate-ha/tasks/heat-validation-create.yml

31 lines
1.1 KiB
YAML

---
- name: Load image in Glance to be used by Heat
shell: |
source {{ working_dir }}/overcloudrc
openstack image create \
--disk-format {{ validate_ha_heat_instance_image_format }} \
--file {{ working_dir }}/{{ heat_image_name }} \
--format value \
--column "id" \
validate_ha_image > \
{{ validate_ha_logs_dir }}/{{ ha_test_name }}_image-create.log 2>&1
- name: Execute environment validation via Heat
shell: |
source {{ working_dir }}/overcloudrc
openstack stack create \
--environment validate-ha-heat-environment.yaml \
--template validate-ha-heat-template.yaml \
--wait \
{{ stack_name }} > \
{{ validate_ha_logs_dir }}/{{ ha_test_name }}_heat-create.log 2>&1
- name: Get instance IP
shell: |
source {{ working_dir }}/overcloudrc
openstack stack show -c outputs -f json {{ stack_name }} | \
jq --raw-output '.outputs[] | select( .output_key == "server_public_ip") | .output_value' 2>&1 | \
tee {{ validate_ha_logs_dir }}/{{ ha_test_name }}_heat-instance-ip.log
register: "{{ stack_name }}_instance_ip"