From 4318b085ade9d9df6906d16d5b01e6b19f287f22 Mon Sep 17 00:00:00 2001 From: Harald Pfeiffer Date: Sun, 12 Dec 2021 13:41:52 +0100 Subject: Bugfix: wrong indent. on SUSE zypper repo check --- patch.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/patch.yml b/patch.yml index e4c26c4..aedcfb6 100644 --- a/patch.yml +++ b/patch.yml @@ -220,24 +220,24 @@ zypper refs && zypper ref become: true listen: "suse upd" - - name: Verify Zypper repository availability - # Now, here's the thing with zypper. If you have a dead repository, you need to face the following facts: - # 1. All output goes to stdout. For zypper lu at least on SLE12/openSUSE42 and earlier, this is: - # - The packages available for update - # - Debug output lik "loading repository data..." and "reading installed packages..." - # (could be silenced with -q, but without RC feedback we need the debug strings again, kek.) - # - WARNING(!!) messages - # ... there is no STDERR. - # 2. There is no return code other than 0 for warnings. - # Great. Interaction with automatisms as if that stuff came directly from Redmond. - # So we need to parse the fucking output string in ansible. Let's start with the "repository not available" warnings. - debug: - msg: "Dead repositories existing and no update present, we consider this a failure." - when: - - zypperlu is search("Repository.*appears to be outdated") - - zypperlu is search("No updates found") - listen: "zypperlu" - failed_when: true + - name: Verify Zypper repository availability + # Now, here's the thing with zypper. If you have a dead repository, you need to face the following facts: + # 1. All output goes to stdout. For zypper lu at least on SLE12/openSUSE42 and earlier, this is: + # - The packages available for update + # - Debug output lik "loading repository data..." and "reading installed packages..." + # (could be silenced with -q, but without RC feedback we need the debug strings again, kek.) + # - WARNING(!!) messages + # ... there is no STDERR. + # 2. There is no return code other than 0 for warnings. + # Great. Interaction with automatisms as if that stuff came directly from Redmond. + # So we need to parse the fucking output string in ansible. Let's start with the "repository not available" warnings. + debug: + msg: "Dead repositories existing and no update present, we consider this a failure." + when: + - zypperlu is search("Repository.*appears to be outdated") + - zypperlu is search("No updates found") + listen: "zypperlu" + failed_when: true - name: Update all packages (SUSE) # we could narrow this down via type:patch, but that's about all. So fire away. zypper: -- cgit v1.2.3