Fix amphora image build jobs

Our periodic amphora image build jobs started failing around mid June
with:

"The conditional check 'install_packages|success' failed. The error was:
template error while templating string: no filter named 'success'.
String: {% if install_packages|success %} True {% else %} False {% endif
%}"

Filters have changed in Ansible 2.9 after a deprecation period.

Additionally, install python3-venv and set virtualenv_command (defaults
to Python 2 "virtualenv") as it seems to be required now too.

Change-Id: I3efa89992cc4a8e2645803dd867d7d2f6e39b966
(cherry picked from commit 9df5f75d49)
(cherry picked from commit 20c0a88bf4)
This commit is contained in:
Carlos Goncalves 2020-07-28 14:18:26 +02:00 committed by Gregory Thiemonge
parent b1cc4467a9
commit 150eafccf4
1 changed files with 5 additions and 2 deletions

View File

@ -7,7 +7,7 @@
update_cache: yes
register: install_packages
become: yes
until: install_packages|success
until: install_packages is success
retries: 5
delay: 2
with_items:
@ -21,13 +21,16 @@
- bc
- rpm
- yum-utils
- python3-venv
- python3-setuptools
- name: Install required pip packages
pip:
name: "{{ item }}"
state: "latest"
virtualenv: /var/tmp/venv
virtualenv_command: python3 -m venv
register: install_packages
until: install_packages|success
until: install_packages is success
retries: 5
delay: 2
become: yes