diff options
author | mail_redacted_for_web | 2021-12-12 13:41:52 +0100 |
---|---|---|
committer | mail_redacted_for_web | 2021-12-12 13:41:52 +0100 |
commit | 4318b085ade9d9df6906d16d5b01e6b19f287f22 (patch) | |
tree | 4080f7c3a30028f65763c0c4e08b28e54bde3073 | |
parent | 461adeaac14feb64bd930b6104917d6a56f4b4ca (diff) | |
download | ansible-4318b085ade9d9df6906d16d5b01e6b19f287f22.tar.bz2 |
Bugfix: wrong indent. on SUSE zypper repo check
-rw-r--r-- | patch.yml | 36 |
1 files changed, 18 insertions, 18 deletions
@@ -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: |