From c8ebf05077378e91e92a3b969ab61d144415291d Mon Sep 17 00:00:00 2001 From: Fabien Boucher Date: May 22 2023 09:50:18 +0000 Subject: Removal of ignore_errors to avoid zuul to display failure Using ignore_errors is misleading for users regarding how zuul display that information. This change removes the usage of that statement. --- diff --git a/roles/rpm-artifact-url/tasks/main.yaml b/roles/rpm-artifact-url/tasks/main.yaml index d9642b2..5ac8d97 100644 --- a/roles/rpm-artifact-url/tasks/main.yaml +++ b/roles/rpm-artifact-url/tasks/main.yaml @@ -1,8 +1,8 @@ --- - name: Check system requirements command: bash -c "type repoquery" - ignore_errors: yes register: repoquery_exists + failed_when: repoquery_exists.rc > 1 - name: Install dnf-utils package package: diff --git a/roles/rpm-lint/tasks/main.yaml b/roles/rpm-lint/tasks/main.yaml index 473ad94..41d75bb 100644 --- a/roles/rpm-lint/tasks/main.yaml +++ b/roles/rpm-lint/tasks/main.yaml @@ -26,14 +26,14 @@ - name: Get rpmlintrc path shell: ls *.rpmlintrc register: rpmlintrc_check - ignore_errors: yes + failed_when: false args: chdir: "{{ zuul.project.src_dir }}" - name: Set rpmlintrc path fact set_fact: rpmlintrc: "{{ rpmlintrc_check.stdout }}" - when: rpmlintrc_check is succeeded + when: rpmlintrc_check.rc == 0 - name: Check for rpmlint.toml stat: