From 7e7626ed2a76d7a9eed73898ea88c521a8cf6278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=2E=20Alberto=20Gim=C3=A9nez?= Date: Sun, 10 May 2020 22:35:05 +0200 Subject: [PATCH] Fix check mode for binary download task MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In check_mode, the binary download task depends on the execution of the previous one, which uses the module shell to fill in a variable. In the download binary task we use a field on that variable that does not exist in check_mode, so the task fails. Signed-off-by: L. Alberto Giménez --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index a57b1e2..ca9912d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -18,7 +18,7 @@ mode: 0755 force: true notify: "Restart gitea" - when: (not gitea_version_check|bool) or (gitea_active_version.stdout != gitea_version) + when: (not gitea_version_check|bool) or (not ansible_check_mode and (gitea_active_version.stdout != gitea_version)) - include: create_user.yml