From 77d593a4b9b4e8af8ee82479e5c8f905d42d349a Mon Sep 17 00:00:00 2001 From: Sergej Date: Tue, 16 Jun 2020 08:53:32 +0200 Subject: [PATCH] Bugfix: set -o pipefail fails silently. This is due the fact that Ansible often takes another default shell to execute its commands, e.g., /bin/sh. Solution is to require /bin/bash for the particular command. --- tasks/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index 7dc5921..00c2fe1 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -4,6 +4,8 @@ - name: "Check gitea version" shell: "set -eo pipefail; /usr/local/bin/gitea -v | cut -d' ' -f 3" + args: + executable: /bin/bash register: gitea_active_version changed_when: false failed_when: false