I am running the python api to develop an inhouse script but the script 
returns always 0 even if a task failed. how can we capture the task exit 
code.? 

the python script always returns 0 even per instance there is a copy tasks 
that failed to validate.  i get on stdout that the task failed however the 
rc code of the script is still 0! 

I am using this example to copy a file to remote hosts it works fine but 
not when the copy is unsuccessful.. 
https://docs.ansible.com/ansible/2.9/dev_guide/developing_api.html

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/97efe21b-9033-4253-a444-a2b1f0f8bdcbn%40googlegroups.com.

Reply via email to