diff --git a/ansible/play b/ansible/play index ffbc990..26aeff3 100755 --- a/ansible/play +++ b/ansible/play @@ -8,5 +8,8 @@ ANSIBLE_SLACK_CMD=`printf "%q " "$0" "$@"` ANSIBLE_SLACK_CMD="${ANSIBLE_SLACK_CMD% }" # strip trailing whitespace export ANSIBLE_SLACK_CMD -ansible localhost --module-name include_role --args name=notify-slack +# Check if --check or -C is present in the arguments +if [[ ! " $* " =~ " --check " && ! " $* " =~ " -C " ]]; then + ansible localhost --module-name include_role --args name=notify-slack +fi ansible-playbook "$@"