Fix packstack jobs and improve playbook's style
Fix the permission denied issue in packstack jobs and make the playbooks more readable. Change-Id: I772bb81c3d10c959055a0c0b872b33e776f50786
This commit is contained in:
parent
720dd39758
commit
e93f9ff2b9
@ -20,6 +20,7 @@
|
||||
- name: Setup Tempest Run Directory
|
||||
include_role:
|
||||
name: setup-tempest-run-dir
|
||||
|
||||
- name: Setup Tempest Data Directory
|
||||
include_role:
|
||||
name: setup-tempest-data-dir
|
||||
@ -37,15 +38,18 @@
|
||||
- name: ACL devstack files
|
||||
include_role:
|
||||
name: acl-devstack-files
|
||||
|
||||
- name: Edit clouds.yaml file
|
||||
include_role:
|
||||
name: tempestconf-workaround-auth-url
|
||||
|
||||
- name: Generate tempest configuration file
|
||||
include_role:
|
||||
name: generate-tempestconf-file
|
||||
vars:
|
||||
create_accounts_file: True
|
||||
source_credentials_commands: "export HOST_IP={{ ansible_default_ipv4.address }}; source {{ devstack_base_dir }}/devstack/openrc {{ user }} {{ user }}; {{ set_auth_url }}"
|
||||
|
||||
- name: Generate tempest configuration file based on cloud credentials
|
||||
include_role:
|
||||
name: generate-tempestconf-file-cloud
|
||||
@ -55,18 +59,21 @@
|
||||
include_role:
|
||||
name: run-tempest
|
||||
when: plugins_paths is not defined
|
||||
- block:
|
||||
- name: Install tempest plugins
|
||||
include_role:
|
||||
name: install-plugins
|
||||
- name: Setup Tempest Run Directory
|
||||
include_role:
|
||||
name: setup-tempest-run-dir
|
||||
- name: Run Tempest Tests including plugins
|
||||
include_role:
|
||||
name: run-tempest
|
||||
vars:
|
||||
tox_envlist: "all"
|
||||
tempest_test_regex: "{{ test_regex|join('|') }}"
|
||||
tempest_black_regex: "{{ black_regex|join('|') }}"
|
||||
when: plugins_paths is defined
|
||||
|
||||
- when: plugins_paths is defined
|
||||
block:
|
||||
- name: Install tempest plugins
|
||||
include_role:
|
||||
name: install-plugins
|
||||
|
||||
- name: Setup Tempest Run Directory
|
||||
include_role:
|
||||
name: setup-tempest-run-dir
|
||||
|
||||
- name: Run Tempest Tests including plugins
|
||||
include_role:
|
||||
name: run-tempest
|
||||
vars:
|
||||
tox_envlist: "all"
|
||||
tempest_test_regex: "{{ test_regex|join('|') }}"
|
||||
tempest_black_regex: "{{ black_regex|join('|') }}"
|
||||
|
@ -1,6 +1,4 @@
|
||||
- hosts: all
|
||||
vars:
|
||||
test_demo_user: "{{ test_demo is defined }}"
|
||||
tasks:
|
||||
# Disable packstack logs copy once packstack deployment finishes
|
||||
# packstack-integration-tempest role is inherited from
|
||||
@ -10,23 +8,31 @@
|
||||
name: packstack-integration-tempest
|
||||
environment:
|
||||
COPY_LOGS: false
|
||||
|
||||
- hosts: tempest
|
||||
vars:
|
||||
test_demo_user: "{{ test_demo is defined }}"
|
||||
tasks:
|
||||
# setup-tempest-user, setup-stack-user and setup-devstack-source-dirs
|
||||
# are inherited from openstack/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
|
||||
@ -44,20 +50,24 @@
|
||||
- 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
|
||||
@ -70,6 +80,7 @@
|
||||
test_demo_user: False
|
||||
user: admin
|
||||
when: test_demo is defined
|
||||
|
||||
- name: Generate accounts file for Tempest
|
||||
include_role:
|
||||
name: generate-accounts-file
|
||||
@ -78,6 +89,7 @@
|
||||
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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user