Is it possible to capture an error code (success/failure) at the level of an ansible role and not each individual task?
We have a rather complex ansible playbook with multiple roles and would like to be able to log (on the remote) the success/failure of each role.
For example, the playbook has five roles. Each playbook role can be individually called using command line options (-e). If two roles are called in the playbook and the second role fails, can the error codes be captured for each of the two roles and written to a file on the remote server (not just in the ansible log file). eg. Role 1 shows success, role two shows failure.
Thanks