python-tempestconf/playbooks/python-tempestconf-tempest-packstack.yaml
Martin Kopec 7b2c156d52 Fix operator_role value for account-generator
When a tempest.conf is generated with admin credentials and
swift is enabled, object-storage.operator_role is set to admin.
This behavior is not wanted, when we generate tempest.conf
for tempest account-generator. In this case the operator_role
will be overriden in cli and set to Member (the same value
as tempest.conf with demo credentials contains)

Change-Id: I8b6e6a814a7cb96ef47bc6d3a8edc3f6a29aebfa
2018-06-19 10:19:05 +00:00

72 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
vars:
tempest_concurrency: 2