On Wednesday, August 19, 2015 at 12:37:59 PM UTC+2, J Hawkesworth wrote:
>
> Not tried myself but I wonder if you could use failed_when to reduce the 
> boilerplate a little:  
> http://docs.ansible.com/ansible/playbooks_error_handling.html#controlling-what-defines-failure
>
 
I believe I did try something like that though, IIRC it still failed the 
playbook because "failed_when:" is meant to turn an "Ok" status into 
"Failed" (e.g. when a command writes an error to stdout while its return 
status is 0), not turn a "Failed" status into "Ok".

Once I tried this I went on to add "when: not ansible_check_mode" but now 
you can't see if that tasks thinks it needs to be executed when running in 
check mode...

Anyhow, I guess I might try it once more. Thanks for your input.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5332ced9-e467-4e4a-9d7f-89bb6ce14c1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to