
centos-8: Setup test-python task fails with: Failed to find required executable virtualenv. This was dropped recently in the base image, so we need to handle this ourselves. We also need to make sure tox is available in test-python so that we can invoke molecule. Change-Id: I200d64103bee540076551fd026cc8f4c21b40411
46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
---
|
|
|
|
- hosts: all
|
|
pre_tasks:
|
|
- name: Set project path fact
|
|
set_fact:
|
|
tripleo_ipa_project_path: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/x/tripleo-ipa'].src_dir }}"
|
|
|
|
- name: Ensure output dirs
|
|
file:
|
|
path: "{{ ansible_user_dir }}/zuul-output/logs"
|
|
state: directory
|
|
|
|
- name: Ensure pip is available
|
|
include_role:
|
|
name: ensure-pip
|
|
|
|
- name: Setup test-python
|
|
pip:
|
|
requirements: "{{ tripleo_ipa_project_path }}/molecule-requirements.txt"
|
|
virtualenv: "{{ ansible_user_dir }}/test-python"
|
|
virtualenv_command: "{{ ensure_pip_virtualenv_command }}"
|
|
virtualenv_site_packages: true
|
|
|
|
- name: Make sure tox is installed in test-python virtualenv
|
|
pip:
|
|
name: tox
|
|
virtualenv: "{{ ansible_user_dir }}/test-python"
|
|
|
|
- name: Display test-python virtualenv package versions
|
|
shell: |-
|
|
. {{ ansible_user_dir }}/test-python/bin/activate
|
|
pip freeze
|
|
|
|
# NOTE(cloudnull): This is being done because docker is not supported on RHEL-8
|
|
# and tests within this repo still require docker.
|
|
- name: Manually install containerd.io
|
|
become: true
|
|
package:
|
|
name: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
|
|
when:
|
|
- (ansible_distribution_major_version | int) >= 8
|
|
roles:
|
|
# docker is needed by multiple molecule scenarios
|
|
- role: ensure-docker
|