Fix missing virtualenv in molecule tests

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
This commit is contained in:
Grzegorz Grasza 2020-06-24 12:15:18 +02:00 committed by Lance Bragstad
parent c22fc8d07d
commit 3f7a8c0347

View File

@ -11,12 +11,22 @@
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