From 834358541d7ad0c80f29ad4aafc40ce64084640d Mon Sep 17 00:00:00 2001 From: Tristan Cacqueray Date: Thu, 22 Feb 2018 06:56:27 +0000 Subject: [PATCH] ara: check for return code instead of succeed In Ansible-2.4, the |succeed behavior changed and always return True when task uses 'failed_when: false'. Also uses "type -p" instead of "which" that is used in other roles. Change-Id: Iddcff07a40dc6c36a1a1c2101a7822697cdbbc34 --- roles/emit-ara-html/tasks/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/emit-ara-html/tasks/main.yaml b/roles/emit-ara-html/tasks/main.yaml index 75909e64b..b68a5c42f 100644 --- a/roles/emit-ara-html/tasks/main.yaml +++ b/roles/emit-ara-html/tasks/main.yaml @@ -12,13 +12,13 @@ - ara_save_database | bool - name: Check for ARA install - command: which ara + command: bash -c "type -p ara" ignore_errors: yes register: ara_command_type when: ara_db_stat.stat.exists - when: - - ara_command_type | succeeded + - ara_command_type.rc == 0 - not ara_command_type | skipped block: # Always generate (true), never (false) or only on failure ('failure')