
Virtualenv 20.0.0 introduced new installation behavior where common libs to all virtualenvs were shared in the user's homedir. Unforatunately this breaks if you make virtualenvs as root and expect other users to use them because /root is not accessible to the regular user. We worked around this with targeted chmodding, but thankfully upstream virtualenv changed the behavior to do copies by default. You have to opt into the other behavior explicitly. At this point our images should have new enough virtualenv that this is a non issue for us. This also has the added benefit of running less code prior to starting the zuul console log daemon which will reduce instances of the annoying "console log daemon not yet running" log messages. Change-Id: I0c5d68b81de9d3d079739f13977e7237577024b9
55 lines
1.8 KiB
YAML
55 lines
1.8 KiB
YAML
- hosts: localhost
|
|
roles:
|
|
- role: emit-job-header
|
|
zuul_log_path_shard_build: true
|
|
- log-inventory
|
|
|
|
- hosts: all
|
|
pre_tasks:
|
|
# NOTE(pabelanger): Until we hit the validate-host role, we have a minimal
|
|
# set of ansible variables collected by zuul-executor. This doesn't include
|
|
# network variables (ansible_default_ipv4 / ansible_default_ipv6) so gather
|
|
# these variables as they are important to the configure-unbound role.
|
|
- name: Gather network facts
|
|
setup:
|
|
gather_subset: 'network'
|
|
|
|
roles:
|
|
- add-build-sshkey
|
|
- start-zuul-console
|
|
- ensure-output-dirs
|
|
|
|
- hosts: all
|
|
roles:
|
|
# NOTE(pabelanger): We run this role in its own play to ensure unbound is
|
|
# restarted before proceeding with any other role. This is because we use
|
|
# notify / handler to restart the unbound service. With ansible notify
|
|
# actions are triggered at the end of each block of tasks in a play.
|
|
- configure-unbound
|
|
|
|
- hosts: all
|
|
roles:
|
|
- validate-host
|
|
- prepare-workspace-git
|
|
- mirror-info
|
|
- role: configure-mirrors
|
|
set_apt_mirrors_trusted: True
|
|
post_tasks:
|
|
- name: |
|
|
Pin importlib-resources to 1.0.2 and virtualenv to 20.0.5 in order
|
|
to fix Virtualenv and Tox
|
|
become: yes
|
|
shell: |
|
|
if type -p pip3 ; then
|
|
# Tox and virtualenv will be python3 installed on platforms with pip3
|
|
pip3 install --upgrade importlib-resources==1.0.2 virtualenv==20.0.5
|
|
else
|
|
# Centos 7 shouldnt have python3 by default and need a pip2 install
|
|
pip install --upgrade importlib-resources==1.0.2 virtualenv==20.0.5
|
|
fi
|
|
args:
|
|
executable: /bin/bash
|
|
# Do our best but if we fail don't cause job to fail as it may run
|
|
# happily without virtualenv or tox.
|
|
failed_when: false
|