Use register to capture the results returned by the module and then you can 
use an assert step to check that the results contain what you expect.

See 
http://docs.ansible.com/ansible/playbooks_variables.html#registered-variables

and 

http://docs.ansible.com/ansible/assert_module.html

There are lots of examples of using assert in the integration test roles 
here: https://github.com/ansible/ansible/tree/devel/test/integration/roles

HTH

Jon



On Monday, 4 April 2016 14:05:17 UTC+1, Herbie van Dalsen wrote:
>
> Hi there,
>
> I cannot find a way to check successful execution of the previous command 
> before doing the next... And I have come across the mention of rc, but how 
> to test for that?
>
> Thank you in advance
>
> H.
>

-- 
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/65c6a2a3-bcc7-4e89-9914-b4b83951a3d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to