From 1863cb00639f5fd3997954676b7f25a9cd39d380 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Fri, 19 Oct 2018 14:58:40 +0100 Subject: [PATCH] Avoid ignore_errors on Set ephemeral device by label Avoids confusing output that looks like: primary | ERROR: Ignoring Errors Return code different than zero is normal and should not fail that task, using failed_when does avoid displaying the task as a failure when the rc is not zero (most builds). Change-Id: I00e70c65c73880281f13d8bf92c5779814e57837 --- roles/configure-swap/tasks/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/configure-swap/tasks/main.yaml b/roles/configure-swap/tasks/main.yaml index e5878b67..436d5851 100644 --- a/roles/configure-swap/tasks/main.yaml +++ b/roles/configure-swap/tasks/main.yaml @@ -19,8 +19,8 @@ - name: Get ephemeral0 device node command: /sbin/blkid -L ephemeral0 register: ephemeral0 - # If this doesn't exist, returns !0 - ignore_errors: yes + # rc !=0 is expected + failed_when: False changed_when: False - name: Set ephemeral device if LABEL exists