diff options
author | zhihui wu <wu.zhihui1@zte.com.cn> | 2017-04-20 09:57:06 +0800 |
---|---|---|
committer | zhihui wu <wu.zhihui1@zte.com.cn> | 2017-04-20 11:10:16 +0800 |
commit | e37805bda96bd54a6c0108e6fb2e67298bbda280 (patch) | |
tree | 027418884e44bc3e5766ae34ffb8498a97694a7c /tests/integration | |
parent | 973f0287b44b3bcac193bc069bd474fc252232db (diff) |
fix apex integration
I didnot find a right way to source Openstack rc file via ansible
module python api. Without openstack rc fiel, openstack cli command
can not be executed. So I move this part to ansible playbook.
Change-Id: I44439560f8ffa1b41890c4e94c9657ab2cc43241
Signed-off-by: zhihui wu <wu.zhihui1@zte.com.cn>
Diffstat (limited to 'tests/integration')
-rw-r--r-- | tests/integration/setup.yaml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/integration/setup.yaml b/tests/integration/setup.yaml index 8d055c23..fed5e9d9 100644 --- a/tests/integration/setup.yaml +++ b/tests/integration/setup.yaml @@ -20,6 +20,27 @@ template: src={{ qtip_resources }}/template/ssh.cfg.j2 dest=./ssh.cfg delegate_to: localhost +- hosts: apex-undercloud + gather_facts: no + + tasks: + - name: collect overcloud baremetal info + shell: . /root/stackrc && openstack baremetal list --fields instance_uuid properties provision_state --format json + register: baremetal_info + - name: collect overcloud server info + shell: . /root/stackrc && openstack server list --format json + register: server_info + - name: generate inventory + apex_generate_inventory: + baremetal_info: "{{ baremetal_info.stdout | from_json }}" + server_info: "{{ server_info.stdout | from_json }}" + - name: update inventory file + template: src={{ qtip_resources }}/template/hosts.j2 dest=./hosts + delegate_to: localhost + - name: update ssh.cfg file + template: src={{ qtip_resources }}/template/ssh.cfg.j2 dest=./ssh.cfg + delegate_to: localhost + # Initialize testapi database - hosts: localhost tasks: |