python-tempestconf/playbooks/python-tempestconf-tempest-devstack.yaml
Martin Kopec b252dbc094 Add initial .zuul file, devstack and packstack job
* Create a structure for Zuul v3 jobs.
* Add tempest jobs running on devstack and packstack environment with admin
  and demo credentials.

Depends-On: I6f19d2b8128fbb0f2034892a11127bce73d102f9
Change-Id: Id52e7e1c42e7e93bece7907b8f4b05e5bfa2a7f9
2018-01-08 09:54:11 +00:00

40 lines
1.6 KiB
YAML

- hosts: all
roles:
# the role is inherited from openstack-dev/devstack project
- run-devstack
- hosts: tempest
vars:
# It's important that OS_AUTH_URL is in this format:
# <protocol>://<host>/identity/v3
# In some cases it can be only: <protocol>://<host>:5000
# https://github.com/openstack-dev/devstack/blob/2c9343e5db44fa7a41ca6924737331dd9088ef8f/openrc#L87-L89
# (mkopec) That would end up with an HTTP MaxRetryError to <host>:5000,
# therefor OS_AUTH_URL is defined manually
set_auth_url: "OS_AUTH_URL=$SERVICE_PROTOCOL://$SERVICE_HOST/identity/v3"
tasks:
# setup-tempest-* and acl-devstack-files roles are inherited from
# openstack/tempest project
- name: Setup Tempest Run Directory
include_role:
name: setup-tempest-run-dir
- name: Setup Tempest Data Directory
include_role:
name: setup-tempest-data-dir
- name: ACL devstack files
include_role:
name: acl-devstack-files
- name: Generate tempest configuration file
include_role:
name: generate-tempestconf-file
vars:
source_credentials_commands: "export HOST_IP={{ ansible_default_ipv4.address }}; source {{ devstack_base_dir }}/devstack/openrc {{ user }} {{ user }}; {{ set_auth_url }}"
aditional_tempestconf_params: "auth.tempest_roles Member"
- name: Generate tempest configuration file based on cloud credentials
include_role:
name: generate-tempestconf-file-cloud
# run-tempest role is inherited from openstack/tempest project
- name: Run Tempest Tests
include_role:
name: run-tempest