
https://review.openstack.org/#/c/621567/ adds --profile and --generate-profile option.An user can override the values in profile.yaml file and pass it to discover-tempest-config to generate the tempest.conf. By using tempest_tempestconf_profile var, we can add the named args within that, then it will be copied to profile.yaml file and --profile arg will be used to generate the tempest.conf. Change-Id: If14bcfe2a7ffbef08786e001d0dee2f9143eea04
64 lines
2.2 KiB
YAML
64 lines
2.2 KiB
YAML
---
|
|
# Copyright 2018, Red Hat Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
- name: Create developer mode constraint file for python-tempestconf
|
|
copy:
|
|
dest: "/opt/developer-pip-constraints.txt"
|
|
content: |
|
|
{% for item in tempest_tempestconf_developer_constraints %}
|
|
{{ item }}
|
|
{% endfor %}
|
|
when: tempest_developer_mode | bool
|
|
|
|
- name: Install python-tempestconf on venv
|
|
include_role:
|
|
name: "python_venv_build"
|
|
vars:
|
|
venv_install_destination_path: "{{ tempest_tempestconf_venv_bin | dirname }}"
|
|
venv_pip_install_args: "{{ tempest_pip_install_args }}"
|
|
venv_pip_packages: "{{ tempest_tempestconf_pip_packages }}"
|
|
when: tempest_install_method == 'source'
|
|
|
|
- name: Override tempestconf profile
|
|
copy:
|
|
content: "{{ tempest_tempestconf_profile | to_nice_yaml }}"
|
|
dest: "{{ tempest_workspace }}/etc/profile.yaml"
|
|
|
|
- name: Executing python-tempestconf
|
|
shell: |
|
|
set -e
|
|
if [ -d {{ tempest_tempestconf_venv_bin }} ]; then
|
|
. {{ tempest_tempestconf_venv_bin }}/activate
|
|
fi
|
|
export OS_AUTH_URL="{{ keystone_service_internaluri }}"
|
|
export OS_IDENTITY_API_VERSION="3"
|
|
export OS_USERNAME="{{ keystone_admin_user_name }}"
|
|
export OS_PROJECT_NAME="{{ keystone_admin_tenant_name }}"
|
|
discover-tempest-config --profile "{{ tempest_workspace }}/etc/profile.yaml"
|
|
environment:
|
|
OS_PASSWORD: "{{ keystone_auth_admin_password }}"
|
|
args:
|
|
chdir: "{{ tempest_workspace }}"
|
|
executable: /bin/bash
|
|
tags:
|
|
# don't trigger ANSIBLE0013
|
|
- skip_ansible_lint
|
|
|
|
- name: Copy tempest.conf to /etc/tempest
|
|
copy:
|
|
src: "{{ tempest_workspace }}/etc/tempest.conf"
|
|
dest: "/etc/tempest/tempest.conf"
|
|
remote_src: yes
|