Files
Kostiantyn Kalynovskyi 3f0f471ed3 [AIR-134] Add airship gate role
airship-libvirt-gate role is designed to build a fully functioning
all-in-one type infrastructure for development, testing or gating
purpose on top of libvirt + qemu. It has concept of `Flavor` which
would allow users to pick fingerprint (size of the env). In this
commit only flavor called `small` is introduced. In near future we
will add other flavors.

For default usecases please see examples/playbooks/gate directory.

Change-Id: Ifefd299592b91ce2810794eb29050874977397f2
2020-01-16 21:10:14 +00:00

41 lines
1.1 KiB
YAML

- name: Include test variables.
include_vars:
file: vars.yml
- name: deploy-gate
include_role:
name: airship-libvirt-gate
vars:
gate_flavor: small
gate_action: build-infra
- name: query redfish to make sure it has runnig domains
uri:
url: http://{{ airship_gate_redfish.bind_address }}:{{ airship_gate_redfish.port }}/redfish/v1/Systems?format=json
method: GET
return_content: yes
register: redfish_response
- name: debug redfish machines
debug:
var: redfish_response
- name: save ids to list
uri:
url: "http://{{ airship_gate_redfish.bind_address }}:{{ airship_gate_redfish.port }}{{ item.value }}?format=json"
method: GET
return_content: yes
with_dict: "{{ redfish_response.json.Members }}"
register: systems_details
- name: deploy ephemeral host
set_fact:
ephemeral_domain_id: "{{ systems_details | json_query(query_string) | join('') }}"
vars:
query_string: "results[?json.Name=='{{ airship_gate_names.ephemeral_vm }}'].json.Id"
- name: verify that id is not empty
assert:
that:
- ephemeral_domain_id is defined
- (ephemeral_domain_id | length) > 1