Add explicit contextlib2 0.5<0.6 for queens ancient virtualenv

As described in related bug we need to install a particular version
of contextlib2 to fix an issue with very old virtualenv installed.
Installing contextlib2 in this way seems to pull in a new enough
version of virtualenv without causing other dependency issues.

Also add tags: notest to skip molecule testing which makes
tox-molecule job fail, ideally this task shouldn't run except queens
release.

Related-Bug: 1863632
Change-Id: Iff5ed3f7f5196016b6cd807ee9408c204b349498
This commit is contained in:
Wes Hayutin 2020-02-19 20:13:11 -07:00 committed by yatin
parent b74529ce99
commit 260689e24d
1 changed files with 10 additions and 0 deletions

View File

@ -40,6 +40,16 @@
libselinux-python
{% endif %}
# https://bugs.launchpad.net/tripleo/+bug/1863632
# "'virtualenv' is a package and cannot be directly executed"
- name: Make sure we have contextlib2 between 0.5 < 0.6 when queens
become: true
when: release in ['queens']
tags: notest
pip:
name: contextlib2>0.5.0,<0.6.0
extra_args: '-U --force-reinstall'
- name: Check if virtualenv is in the system
command: "{{ python_cmd }} -m virtualenv --version"
args: