python-tempestconf/playbooks/python-tempestconf-tempest-packstack.yaml
Martin Kopec c6ec0bdc79 Don't expose credentials
Don't expose credentials to tempest.conf when
--create-test-accounts is used.

When generating tempest.conf with demo creds, use
--create-accounts-file argument so that the argument
is tested in the gates.
The argument is used only on Devstack.

Tempest concurrency of devstack demo job is reduced to 1
because the minimal accounts file is used.

Change-Id: Id5c90810666d783cf3939086ef27149ef53277f8
Story: 2003016
Task: 23036
2018-08-10 14:38:15 +00:00

70 lines
2.6 KiB
YAML

- hosts: all
vars:
test_demo_user: "{{ test_demo is defined }}"
tasks:
# packstack-integration-tempest role is inherited from
# openstack/packstack project
- name: Install packstack allinone
include_role:
name: packstack-integration-tempest
# setup-tempest-user, setup-stack-user and setup-devstack-source-dirs
# are inherited from openstack-dev/devstack
- name: Setup Stack user
include_role:
name: setup-stack-user
- name: Setup Tempest user
include_role:
name: setup-tempest-user
- name: Setup Tempest user
include_role:
name: setup-devstack-source-dirs
# 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: Prepare keystonerc credentials generated by packstack
include_role:
name: create-keystonerc-files
- name: Create clouds.yaml file
include_role:
name: create-clouds-yaml-file
vars:
cloudname: "packstack-admin"
source_credentials_commands: "source {{ ansible_user_dir }}/keystonerc_admin"
- name: Generate configuration file for Tempest
include_role:
name: generate-tempestconf-file
vars:
source_credentials_commands: "source {{ ansible_user_dir }}/keystonerc_{{ user }}"
# Let's create tempest.conf with admin permissions needed for
# tempest accounts file generation
- name: Generate configuration file for Tempest as admin
include_role:
name: generate-tempestconf-file
vars:
aditional_tempestconf_params: "object-storage.operator_role Member"
output_path: "/etc/openstack/tempest_admin.conf"
source_credentials_commands: "source {{ ansible_user_dir }}/keystonerc_admin"
test_demo_user: False
user: admin
when: test_demo is defined
- name: Generate accounts file for Tempest
include_role:
name: generate-accounts-file
vars:
accounts_file_destination: "/etc/openstack"
source_credentials_commands: "source {{ ansible_user_dir }}/keystonerc_admin"
tempest_config_file: "/etc/openstack/tempest_admin.conf"
when: test_demo is defined
# run-tempest role is inherited from openstack/tempest project
- name: Run Tempest Tests
include_role:
name: run-tempest