Execution
Date 15 Dec 2025 10:19:13 +0000
Duration 00:23:12.82
Controller aio1.openstack.local
User root
Versions
Ansible 2.18.6
ara 1.7.4 / 1.7.4
Python 3.12.3
Summary
9 Hosts
618 Tasks
960 Results
108 Plays
456 Files
0 Records

File: /home/zuul/src/opendev.org/openstack/openstack-ansible-os_tempest/tasks/tempest_install_source.yml

---
# 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
  ansible.builtin.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
  ansible.builtin.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
  ansible.builtin.uri:
    url: "{{ tempest_upper_constraints_url }}"
    return_content: true
  register: _u_c_contents

- name: Install the python venv
  ansible.builtin.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: "{{ tempest_install_method == 'source' }}"
    venv_pip_packages: "{{ tempest_pip_packages + tempest_pip_plugins }}"
    venv_facts_when_changed:
      - section: "tempest"
        option: "venv_tag"
        value: "{{ tempest_venv_tag }}"