Chandan Kumar 8a3775ae64 Use tempest_cloud_name in tempestconf
Currently on doing tempest_use_tempestconf to true, It depends on
keystone specific parameters which is not defined in os_tempest
role leading to undefined variables. Since os_tempest has nice
support of clouds.yaml for all tempest resource creation,
tempestconf also have the same and almost all openstack installers
have the same. Let's use it the same in python-tempestconf for
generating tempest.conf.

Change-Id: I498a3362ec917a3d6c9c67986770e623e6cefec2
2019-01-30 11:00:31 +05:30

58 lines
1.9 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
discover-tempest-config --profile "{{ tempest_workspace }}/etc/profile.yaml"
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