CI: Use python3 in deploy-teardown jobs
This change modifies the deploy-teardown jobs to use python 3 in the local virtualenv in which ansible is installed. It also switches to use python 3 on Ubuntu remote hosts via ansible_python_interpreter. Python 3 support for CentOS remote hosts will be added with CentOS 8 support. Depends-On: https://github.com/stackhpc/ansible-role-libvirt-host/pull/19 Change-Id: I1e117525a49c1732c70a3f5925b1b88a3a865e11
This commit is contained in:
parent
b783f1c66d
commit
9dac363628
|
@ -19,10 +19,16 @@
|
|||
src: tenks-overrides.yml.j2
|
||||
dest: "{{ tenks_overrides_path }}"
|
||||
|
||||
- name: Install python3
|
||||
become: true
|
||||
package:
|
||||
name: python3
|
||||
|
||||
- name: Create virtualenv for tenks
|
||||
pip:
|
||||
requirements: "{{ tenks_src_dir }}/requirements.txt"
|
||||
virtualenv: "{{ tenks_venv }}"
|
||||
virtualenv_python: python3
|
||||
|
||||
- name: Template requirements overrides
|
||||
template:
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
---
|
||||
# Use python3 on Ubuntu remote hosts.
|
||||
ansible_python_interpreter: "{{ '/usr/bin/python3' if ansible_os_family != 'RedHat' else '/usr/bin/python2' }}"
|
||||
|
||||
# This file holds the config given to Tenks when running the zuul job,
|
||||
# tenks-deploy-teardown. It assumes the existence of the bridge `breth1`.
|
||||
|
||||
|
|
Loading…
Reference in New Issue