From 5aca0109df1cc1581017a584542ce9aa49ab8cfe Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 30 Mar 2017 16:11:41 +0200 Subject: [PATCH] We use Ansible 2.2 so check_mode is available --- tasks/commit_etc_git.yml | 8 ++------ tasks/run_evocheck.yml | 1 + 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tasks/commit_etc_git.yml b/tasks/commit_etc_git.yml index 71df8e6..a1af89d 100644 --- a/tasks/commit_etc_git.yml +++ b/tasks/commit_etc_git.yml @@ -5,9 +5,7 @@ chdir: /etc changed_when: False register: git_status - # Use this with Ansible 2.1+ - #when: not ansible_check_mod - always_run: yes + when: not ansible_check_mod ignore_errors: yes tags: - git @@ -17,9 +15,7 @@ args: chdir: /etc register: etc_commit_end_evolinux - # Use this with Ansible 2.1+ - #when: not ansible_check_mode and git_status.stdout != "" - when: git_status.rc == 0 and git_status.stdout != "" + when: not ansible_check_mode and git_status.stdout != "" ignore_errors: yes tags: - git diff --git a/tasks/run_evocheck.yml b/tasks/run_evocheck.yml index 545fffd..517017b 100644 --- a/tasks/run_evocheck.yml +++ b/tasks/run_evocheck.yml @@ -4,3 +4,4 @@ register: evocheck_run changed_when: False failed_when: evocheck_run.stdout != "" + check_mode: no