From 69543c2273dbb61231658714baef418d810b52a5 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Thu, 16 Dec 2021 11:38:13 +0200
Subject: [PATCH] Stricter error catching for fwupdmgr.

---
 Ansible/update.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Ansible/update.yaml b/Ansible/update.yaml
index 1d6bb85..3ea59e2 100644
--- a/Ansible/update.yaml
+++ b/Ansible/update.yaml
@@ -28,7 +28,8 @@
           command: fwupdmgr --assume-yes update
           register: fwupdmgr
           changed_when: fwupdmgr.stdout_lines|length > 0
-          ignore_errors: true
+          # yamllint disable rule:line-length
+          failed_when: fwupdmgr.rc not in [0, 2] and "No updatable devices" not in fwupdmgr.stderr_lines
 
         - name: Gather package facts
           package_facts:
-- 
GitLab