From c43b30e3ceebabb5d2928f49c0f03e31bd9a5c68 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Fri, 22 Feb 2019 18:17:25 +0100 Subject: [PATCH] common: fix retry on raw install python for rhel when the following failure is thrown ``` rhel-8.0.0-beta-1.7- [=== ] --- B/s | 0 B --:-- ETArhel-8.0.0-beta-1.7-appstream 0.0 B/s | 0 B 00:00 rhel-8.0.0-beta-1.7- [=== ] --- B/s | 0 B --:-- ETArhel-8.0.0-beta-1.7-baseos 0.0 B/s | 0 B 00:00 rhel-8.0.0-beta-1.7- [ === ] --- B/s | 0 B --:-- ETArhel-8.0.0-beta-1.7-builder 0.0 B/s | 0 B 00:00 Failed to synchronize cache for repo 'rhel-8.0.0-beta-1.7-appstream', ignoring this repo. Failed to synchronize cache for repo 'rhel-8.0.0-beta-1.7-baseos', ignoring this repo. Failed to synchronize cache for repo 'rhel-8.0.0-beta-1.7-builder', ignoring this repo. No match for argument: python3 Error: Unable to find a match ``` dnf returns 0 anyway. Let's ensure the pattern 'Failed' isn't present in the output. Signed-off-by: Guillaume Abrioux --- raw_install_python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raw_install_python.yml b/raw_install_python.yml index 7c9ab15d0..cd274ee63 100644 --- a/raw_install_python.yml +++ b/raw_install_python.yml @@ -19,7 +19,7 @@ register: result when: - systempython.stat is undefined or not systempython.stat.exists - until: (result is succeeded) or ('Failed' not in result.stdout) + until: (result is succeeded) and ('Failed' not in result.stdout) - name: install python for opensuse raw: zypper -n install python-base creates=/usr/bin/python2.7 -- 2.39.5