Role os_tempest for OpenStack-Ansible
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
openstack-ansible-os_tempest/tasks/tempest_install_source.yml

48 lines
2.0 KiB

---
# Copyright 2014, Rackspace US, 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: Generate list of tempest plugins installed from source code
set_fact:
tempest_pip_plugins: "{{ tempest_pip_plugins | default([]) + ['git+' ~ item.repo ~ '@' ~ item.branch ~ '#egg=' ~ item.name] }}"
with_items: "{{ tempest_plugins }}"
when: item.repo is defined
- name: Append to list any tempest plugins installed from python packages
set_fact:
tempest_pip_plugins: "{{ tempest_pip_plugins | default([]) + [item.package] }}"
with_items: "{{ tempest_plugins }}"
when: item.package is defined
- name: Retrieve the constraints URL
uri:
url: "{{ tempest_upper_constraints_url }}"
return_content: yes
register: _u_c_contents
- name: Install the python venv
import_role:
name: "python_venv_build"
vars:
venv_python_executable: "{{ tempest_venv_python_executable }}"
venv_build_constraints: "{{ (tempest_git_repo is defined) | ternary( _u_c_contents.content.split('\n') | reject('match', '^tempest=') | list, tempest_git_constraints) }}"
venv_install_destination_path: "{{ tempest_venv_bin | dirname }}"
venv_build_distro_package_list: "{{ tempest_devel_distro_packages }}"
venv_pip_install_args: "{{ tempest_pip_install_args }}"
venv_wheel_build_enable: "{{ venv_build_host != inventory_hostname }}"
venv_pip_packages: "{{ tempest_pip_packages + tempest_pip_plugins }}"
venv_facts_when_changed:
- section: "tempest"
option: "venv_tag"
value: "{{ tempest_venv_tag }}"