I want to a perform convergence test for a playbook. Convergence test checks if second run of the same playbook make no changes.
Is there a way to say Ansible "make exit code non-zero if there was a task in 'changed' state?". I can parse stdout, but it's ugly.
Example:
set -e
ansible-playbook -i inventory.yaml site.yaml # normal run
ansible-playbook --help-me-here -i inventory.yaml site.yaml # should return non-zero if anything changed.