ensure-virtualenv: Don't support on CentOS 9-stream
It looks like 9-stream don't want to support virtualenv. Fail the ensure-virtualenv role on this platform, and account for this in testing. People should use ensure-pip and venv which is portable everywhere. Change-Id: Ifae93c1eeb96792aa26a624574d595d77cb58c4b
This commit is contained in:
parent
ab4042e60a
commit
239ace0ebf
@ -1,6 +1,16 @@
|
|||||||
|
# It looks like CentOS 9 has no plans to support this,
|
||||||
|
# and we should be using "python3 -m venv". [1]
|
||||||
|
#
|
||||||
|
# ensure-pip already exports 'ensure_pip_virtualenv_command'
|
||||||
|
#
|
||||||
|
# [1] https://lists.centos.org/pipermail/centos-devel/2021-August/098470.html
|
||||||
|
- name: Fail on CentOS 9
|
||||||
|
fail:
|
||||||
|
msg: 'This element not supported on CentOS >= 9'
|
||||||
|
when: (ansible_facts['distribution'] == 'CentOS' and ansible_facts['distribution_major_version']|int >= 9)
|
||||||
|
|
||||||
- name: Install virtualenv
|
- name: Install virtualenv
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- python3-virtualenv
|
- python3-virtualenv
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
|
@ -36,6 +36,10 @@
|
|||||||
$run_pip wheel --no-deps .
|
$run_pip wheel --no-deps .
|
||||||
ls zuul-*.whl || exit 1
|
ls zuul-*.whl || exit 1
|
||||||
|
|
||||||
|
- name: Test virtualenv
|
||||||
|
# NOTE(ianw) 2022-02-03 : not supported on 9-stream, see inline comments
|
||||||
|
when: not (ansible_facts['distribution'] == 'CentOS' and ansible_facts['distribution_major_version']|int >= 9)
|
||||||
|
block:
|
||||||
# ensure-virtualenv
|
# ensure-virtualenv
|
||||||
- name: Include ensure-virtualenv
|
- name: Include ensure-virtualenv
|
||||||
include_role:
|
include_role:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user