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:
committed by
Jesse Pretorius (odyssey4me)
parent
f7034f4790
commit
adad0bc0b3
@@ -16,35 +16,45 @@
|
|||||||
- name: Create a zun image
|
- name: Create a zun image
|
||||||
hosts: zun_compute
|
hosts: zun_compute
|
||||||
remote_user: root
|
remote_user: root
|
||||||
|
gather_facts: true
|
||||||
|
any_errors_fatal: true
|
||||||
|
vars_files:
|
||||||
|
- common/test-vars.yml
|
||||||
tasks:
|
tasks:
|
||||||
- name: Pull cirros image
|
- name: Pull cirros image
|
||||||
command: docker pull cirros
|
command: docker pull cirros
|
||||||
# TODO(cloudnull): Set up failed_when and changed_when conditions
|
# TODO(cloudnull): Set up failed_when and changed_when conditions
|
||||||
tags:
|
changed_when: false
|
||||||
- skip_ansible_lint
|
|
||||||
|
- name: Ensure the clouds.yaml file is present
|
||||||
|
include_role:
|
||||||
|
name: openstack_openrc
|
||||||
|
|
||||||
- name: Upload image into glance
|
- name: Upload image into glance
|
||||||
shell: |
|
shell: |
|
||||||
. /root/openrc
|
docker save cirros | /openstack/venvs/zun-untagged/bin/openstack --os-cloud default image create zun-cirros --public --container-format docker --disk-format raw
|
||||||
docker save cirros | /openstack/venvs/zun-untagged/bin/openstack image create zun-cirros --public --container-format docker --disk-format raw
|
|
||||||
# TODO(cloudnull): Set up failed_when and changed_when conditions
|
# TODO(cloudnull): Set up failed_when and changed_when conditions
|
||||||
tags:
|
changed_when: false
|
||||||
- skip_ansible_lint
|
|
||||||
|
|
||||||
- name: Run zun service check
|
- name: Run zun service check
|
||||||
hosts: zun_api[0]
|
hosts: zun_api[0]
|
||||||
remote_user: root
|
remote_user: root
|
||||||
|
gather_facts: true
|
||||||
|
any_errors_fatal: true
|
||||||
|
vars_files:
|
||||||
|
- common/test-vars.yml
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: Ensure the clouds.yaml file is present
|
||||||
|
include_role:
|
||||||
|
name: openstack_openrc
|
||||||
|
|
||||||
- name: Check zun service is functional
|
- name: Check zun service is functional
|
||||||
shell: |
|
command: |
|
||||||
. /root/openrc
|
/openstack/venvs/zun-untagged/bin/openstack --os-cloud default appcontainer service list
|
||||||
/openstack/venvs/zun-untagged/bin/openstack appcontainer service list
|
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Create zun container
|
- name: Create zun container
|
||||||
shell: |
|
command: |
|
||||||
. /root/openrc
|
/openstack/venvs/zun-untagged/bin/openstack --os-cloud default appcontainer run --name container-check --net network=private zun-cirros ping 127.0.0.1
|
||||||
/openstack/venvs/zun-untagged/bin/openstack 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
|
# TODO(cloudnull): Set up failed_when and changed_when conditions
|
||||||
tags:
|
changed_when: false
|
||||||
- skip_ansible_lint
|
|
||||||
|
|||||||
@@ -17,11 +17,11 @@
|
|||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-ansible-linters
|
- openstack-ansible-linters
|
||||||
- openstack-ansible-functional-ubuntu-xenial:
|
- openstack-ansible-functional-ubuntu-xenial
|
||||||
voting: false
|
|
||||||
experimental:
|
|
||||||
jobs:
|
|
||||||
- openstack-ansible-integrated-deploy-aio
|
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-ansible-linters
|
- openstack-ansible-linters
|
||||||
|
- openstack-ansible-functional-ubuntu-xenial
|
||||||
|
experimental:
|
||||||
|
jobs:
|
||||||
|
- openstack-ansible-integrated-deploy-aio
|
||||||
|
|||||||
Reference in New Issue
Block a user