tests: Ensure clouds.yaml is present, and use it
Instead of sourcing openrc (which is so 1995), we use clouds.yaml instead. Also, to make sure it is there we run the role that puts it there. Change-Id: I15769746ffbcfdc990e39dee4fb1545b564bb442
This commit is contained in:
parent
f7034f4790
commit
adad0bc0b3
@ -16,35 +16,45 @@
|
||||
- name: Create a zun image
|
||||
hosts: zun_compute
|
||||
remote_user: root
|
||||
gather_facts: true
|
||||
any_errors_fatal: true
|
||||
vars_files:
|
||||
- common/test-vars.yml
|
||||
tasks:
|
||||
- name: Pull cirros image
|
||||
command: docker pull cirros
|
||||
# TODO(cloudnull): Set up failed_when and changed_when conditions
|
||||
tags:
|
||||
- skip_ansible_lint
|
||||
changed_when: false
|
||||
|
||||
- name: Ensure the clouds.yaml file is present
|
||||
include_role:
|
||||
name: openstack_openrc
|
||||
|
||||
- name: Upload image into glance
|
||||
shell: |
|
||||
. /root/openrc
|
||||
docker save cirros | /openstack/venvs/zun-untagged/bin/openstack image create zun-cirros --public --container-format docker --disk-format raw
|
||||
docker save cirros | /openstack/venvs/zun-untagged/bin/openstack --os-cloud default image create zun-cirros --public --container-format docker --disk-format raw
|
||||
# TODO(cloudnull): Set up failed_when and changed_when conditions
|
||||
tags:
|
||||
- skip_ansible_lint
|
||||
changed_when: false
|
||||
|
||||
- name: Run zun service check
|
||||
hosts: zun_api[0]
|
||||
remote_user: root
|
||||
gather_facts: true
|
||||
any_errors_fatal: true
|
||||
vars_files:
|
||||
- common/test-vars.yml
|
||||
tasks:
|
||||
- name: Ensure the clouds.yaml file is present
|
||||
include_role:
|
||||
name: openstack_openrc
|
||||
|
||||
- name: Check zun service is functional
|
||||
shell: |
|
||||
. /root/openrc
|
||||
/openstack/venvs/zun-untagged/bin/openstack appcontainer service list
|
||||
command: |
|
||||
/openstack/venvs/zun-untagged/bin/openstack --os-cloud default appcontainer service list
|
||||
changed_when: false
|
||||
|
||||
- name: Create zun container
|
||||
shell: |
|
||||
. /root/openrc
|
||||
/openstack/venvs/zun-untagged/bin/openstack appcontainer run --name container-check --net network=private zun-cirros ping 127.0.0.1
|
||||
command: |
|
||||
/openstack/venvs/zun-untagged/bin/openstack --os-cloud default appcontainer run --name container-check --net network=private zun-cirros ping 127.0.0.1
|
||||
# TODO(cloudnull): Set up failed_when and changed_when conditions
|
||||
tags:
|
||||
- skip_ansible_lint
|
||||
changed_when: false
|
||||
|
@ -17,11 +17,11 @@
|
||||
check:
|
||||
jobs:
|
||||
- openstack-ansible-linters
|
||||
- openstack-ansible-functional-ubuntu-xenial:
|
||||
voting: false
|
||||
experimental:
|
||||
jobs:
|
||||
- openstack-ansible-integrated-deploy-aio
|
||||
- openstack-ansible-functional-ubuntu-xenial
|
||||
gate:
|
||||
jobs:
|
||||
- openstack-ansible-linters
|
||||
- openstack-ansible-functional-ubuntu-xenial
|
||||
experimental:
|
||||
jobs:
|
||||
- openstack-ansible-integrated-deploy-aio
|
||||
|
Loading…
Reference in New Issue
Block a user