virtualenv-config : add download for virtualenv seeder

As described in the inline comments, this is working around a broken
version of setuptools vendored by virtualenv currently.  Specify in a
config file that it should download the latest helper tools, rather
then rely on the inbuilt versions.

Add to the base-test pre-playbook; after testing we can move to the
base playbook.

Change-Id: Ib17017637eae81a3ff57302e7c77945f2045b5ac
This commit is contained in:
Ian Wienand 2020-03-27 11:25:05 +11:00
parent 6bdee360b9
commit 96052cfebf
3 changed files with 34 additions and 0 deletions

View File

@ -34,3 +34,7 @@
- mirror-info
- role: configure-mirrors
set_apt_mirrors_trusted: True
# NOTE(ianw): 2020-03-27 : broken setuptools, until
# https://github.com/pypa/virtualenv/issues/1752
# releases
- virtualenv-config

View File

@ -0,0 +1,11 @@
Write a configuration file for virtualenv
Generally we do not require any specific virtualenv configuration.
However, there are corner cases; such as virtualenv shipping an
vendored version of setuptools that needs to be ignored or similar.
The exact action this role is taking may depend on any issues it is
working around. See comments inline.
** Role Variables **

View File

@ -0,0 +1,19 @@
- name: Set config file
set_fact:
virtualenv_config_file: '{{ ansible_env.HOME }}/.config/virtualenv/virtualenv.ini'
- name: Ensure config directory
file:
path: '{{ virtualenv_config_file | dirname }}'
state: directory
mode: 0755
# NOTE(ianw) : 2020-03-27 workaround 46.1.1 broken setuptools
# https://github.com/pypa/virtualenv/issues/1752
- name: Add download flag, to not use vendorded versions of setuptools/pip
ini_file:
path: '{{ virtualenv_config_file }}'
section: 'virtualenv'
option: download
value: 'True'
mode: '0644'