We use Ansible 2.2 so check_mode is available

This commit is contained in:
Jérémy Lecour 2017-03-30 16:11:41 +02:00 committed by Jérémy Lecour
parent 2bd516ab05
commit 5aca0109df
2 changed files with 3 additions and 6 deletions

View File

@ -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

View File

@ -4,3 +4,4 @@
register: evocheck_run
changed_when: False
failed_when: evocheck_run.stdout != ""
check_mode: no