
This commit was bulk generated and pushed by the OpenDev sysadmins as a part of the Git hosting and code review systems migration detailed in these mailing list posts: http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html Attempts have been made to correct repository namespaces and hostnames based on simple pattern matching, but it's possible some were updated incorrectly or missed entirely. Please reach out to us via the contact information listed at https://opendev.org/ with any questions you may have.
103 lines
3.1 KiB
YAML
103 lines
3.1 KiB
YAML
- block:
|
|
- name: Create python-tempestconf venv with latest pip, setuptools and pbr
|
|
pip:
|
|
virtualenv: "{{ virtualenvs.tempestconf }}"
|
|
virtualenv_python: "{{ tempestconf_pip_virtualenv_python|default(omit) }}"
|
|
name: "{{ item }}"
|
|
state: latest
|
|
with_items:
|
|
- pip
|
|
- setuptools
|
|
- pbr
|
|
|
|
- name: Debug, list tempestconf dir
|
|
shell: |
|
|
set -ex
|
|
ls -all .
|
|
pwd
|
|
args:
|
|
chdir: "{{ tempestconf_src_relative_path }}"
|
|
|
|
- name: Install python-tempestconf
|
|
pip:
|
|
name: "."
|
|
virtualenv: "{{ virtualenvs.tempestconf }}"
|
|
chdir: "{{ tempestconf_src_relative_path }}"
|
|
virtualenv_python: "{{ tempestconf_pip_virtualenv_python|default(omit) }}"
|
|
|
|
- name: Generate tempest configuration file
|
|
shell: |
|
|
set -ex
|
|
export PATH=$PATH:/usr/local/sbin:/usr/sbin
|
|
source {{ virtualenvs.tempestconf }}/bin/activate
|
|
printenv
|
|
discover-tempest-config \
|
|
--out etc/cloud_tempest.conf \
|
|
--debug \
|
|
-v \
|
|
{% if cloud_user == "devstack-admin" %}
|
|
--create \
|
|
{% else %}
|
|
--non-admin \
|
|
{% endif %}
|
|
--os-cloud {{ cloud_user }} \
|
|
auth.tempest_roles Member
|
|
args:
|
|
chdir: "{{ tempestconf_src_relative_path }}"
|
|
executable: /bin/bash
|
|
|
|
- set_fact:
|
|
profile:
|
|
debug: true
|
|
out: etc/tempest_profile.conf
|
|
verbose: true
|
|
create: "{{ cloud_user == 'devstack-admin' }}"
|
|
non_admin: "{{ cloud_user == 'devstack' }}"
|
|
os_cloud: "{{ cloud_user }}"
|
|
overrides:
|
|
auth.tempest_roles: Member
|
|
|
|
- name: Generate sample profile.yaml file
|
|
shell: |
|
|
set -ex
|
|
export PATH=$PATH:/usr/local/sbin:/usr/sbin
|
|
source {{ virtualenvs.tempestconf }}/bin/activate
|
|
printenv
|
|
discover-tempest-config \
|
|
--generate-profile ./etc/profile.yaml
|
|
args:
|
|
chdir: "{{ tempestconf_src_relative_path }}"
|
|
executable: /bin/bash
|
|
|
|
- name: Edit the profile.yaml file
|
|
copy:
|
|
content: "{{ profile | to_nice_yaml }}"
|
|
dest: "{{ tempestconf_src_relative_path }}/etc/profile.yaml"
|
|
|
|
- name: Generate tempest configuration file with profile.yaml
|
|
shell: |
|
|
set -ex
|
|
export PATH=$PATH:/usr/local/sbin:/usr/sbin
|
|
source {{ virtualenvs.tempestconf }}/bin/activate
|
|
printenv
|
|
cat ./etc/profile.yaml
|
|
discover-tempest-config \
|
|
--profile ./etc/profile.yaml
|
|
args:
|
|
chdir: "{{ tempestconf_src_relative_path }}"
|
|
executable: /bin/bash
|
|
|
|
- name: Compare tempest.conf and tempest_profile.conf
|
|
shell: |
|
|
python ./roles/generate-tempestconf-file-cloud/tasks/compare-ini.py ./etc/cloud_tempest.conf ./etc/tempest_profile.conf
|
|
args:
|
|
chdir: "{{ tempestconf_src_relative_path }}"
|
|
|
|
- name: Print generated tempest.conf
|
|
shell: |
|
|
set -ex
|
|
cat {{ tempestconf_src_relative_path }}/etc/cloud_tempest.conf
|
|
|
|
vars:
|
|
tempestconf_src_relative_path: "{{ zuul.projects['opendev.org/openstack/python-tempestconf'].src_dir }}"
|