aboutsummaryrefslogtreecommitdiff
path: root/tests/pre.yml
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <marcin.juszkiewicz@linaro.org>2020-04-27 11:21:51 +0200
committerRadosław Piliszek <radoslaw.piliszek@gmail.com>2020-04-28 19:15:06 +0200
commit30b8eed1cd685ac1605e7388fd4244cf9697e647 (patch)
treec2399188371cc41e9c4b5e0f1f40b4a14f28e2b4 /tests/pre.yml
parent0747ebf1c9c031510acc1254f92d46848bcc921a (diff)
downloadkolla-ansible-30b8eed1cd685ac1605e7388fd4244cf9697e647.tar.gz
kolla-ansible-30b8eed1cd685ac1605e7388fd4244cf9697e647.zip
CI: Fix Debian aarch64 jobs
Debian defaults to Python2 which is not complete in aarch64 images. This patch changes CI to always use Python3. We need to install several Python modules to have working ussuri jobs. "Failed to import the required Python library (setuptools) on primary's Python /usr/bin/python3." And then several Python2 ones for train->ussuri upgrade jobs: "Unable to find any of pip2 to use. pip needs to be installed." Change-Id: Ia0d3ff15d97d1cabbb0b8e7f32e8712ca3f94732
Diffstat (limited to 'tests/pre.yml')
-rw-r--r--tests/pre.yml32
1 files changed, 30 insertions, 2 deletions
diff --git a/tests/pre.yml b/tests/pre.yml
index 3f7802226..075d9ad3e 100644
--- a/tests/pre.yml
+++ b/tests/pre.yml
@@ -25,11 +25,39 @@
tasks:
# NOTE(yoctozepto): we use gawk to add time to each logged line
# outside of Ansible (e.g. for init-runonce)
- - name: Install gawk
+ - name: Install gawk and Python modules
package:
- name: gawk
+ name:
+ - gawk
+ - python3-pip
+ - python3-setuptools
+ - python3-virtualenv
+ - python3-wheel
become: true
+ # FIXME(hrw): drop when previous_release == ussuri
+ - name: Install Python2 modules for stable/train
+ package:
+ name:
+ - python-pip
+ - python-setuptools
+ - python-virtualenv
+ - python-wheel
+ become: true
+ when:
+ - is_upgrade
+ - previous_release == 'train'
+ - not (ansible_os_family == "RedHat" and ansible_distribution_major_version | int == 8)
+
+ # NOTE(hrw): On RedHat systems it is part of python3-virtualenv
+ - name: Install virtualenv on Debian systems
+ package:
+ name:
+ - virtualenv
+ become: true
+ when:
+ ansible_os_family == "Debian"
+
- name: Ensure /tmp/logs/ dir
file:
path: "{{ logs_dir }}"