Also pin pip/setuptools when creating Xenial venvs
We still have some Ubuntu Xenial servers, so cap the max usable pip and setuptools versions in their venvs like we already do for Bionic, in order to avoid broken installations. Switch our conditionals from release name comparisons to version numbers in order to more cleanly support ranges. Also make sure the borg run test is triggered by changes to the create-venv role. Change-Id: I5dd064c37786c47099bf2da66b907facb517c92a
This commit is contained in:
parent
ea08cdbd16
commit
2d9d24d07d
@ -2,10 +2,22 @@
|
||||
assert:
|
||||
that: create_venv_path is defined
|
||||
|
||||
# Xenial's default pip will try to pull in packages that
|
||||
# aren't compatible with 3.5. Cap them
|
||||
- name: Setup bionic era venv
|
||||
when: ansible_distribution_version is version('16.04', '==')
|
||||
pip:
|
||||
name:
|
||||
- pip<21
|
||||
- setuptools<51
|
||||
state: latest
|
||||
virtualenv: '{{ create_venv_path }}'
|
||||
virtualenv_command: '/usr/bin/python3 -m venv'
|
||||
|
||||
# Bionic's default pip will try to pull in packages that
|
||||
# aren't compatible with 3.6. Cap them
|
||||
- name: Setup bionic era venv
|
||||
when: ansible_distribution_release == 'bionic'
|
||||
when: ansible_distribution_version is version('18.04', '==')
|
||||
pip:
|
||||
name:
|
||||
- pip<22
|
||||
@ -15,7 +27,7 @@
|
||||
virtualenv_command: '/usr/bin/python3 -m venv'
|
||||
|
||||
- name: Setup later era venv
|
||||
when: ansible_distribution_release != 'bionic'
|
||||
when: ansible_distribution_version is version('20.04', '>=')
|
||||
pip:
|
||||
name:
|
||||
- pip
|
||||
|
@ -392,6 +392,7 @@
|
||||
- playbooks/bootstrap-bridge.yaml
|
||||
- playbooks/roles/install-borg
|
||||
- playbooks/roles/borg-backup
|
||||
- playbooks/roles/create-venv
|
||||
- playbooks/zuul/templates/host_vars/borg-backup
|
||||
- testinfra/test_borg_backups.py
|
||||
host-vars:
|
||||
|
Loading…
Reference in New Issue
Block a user