python-tempestconf/playbooks/python-tempestconf-tempest-...

36 lines
1.5 KiB
YAML

- hosts: all
roles:
# roles are inherited from openstack/tempest project
# except of generate-tempestconf-file role
- run-devstack
- hosts: tempest
vars:
devstack_full_path: "{{ ansible_user_dir }}/{{ zuul._projects['git.openstack.org/openstack-dev/devstack'].src_dir }}"
# 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:
- 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 configuration file for python-tempestconf
include_role:
name: generate-tempestconf-file
vars:
source_admin_credentials_commands: "source {{ devstack_full_path }}/openrc admin admin \ {{ set_auth_url }}"
source_demo_credentials_commands: "source {{ devstack_full_path }}/openrc demo demo \ {{ set_auth_url }}"
- name: Run Tempest Tests
include_role:
name: run-tempest