I have a use case to monitor very long running plays over very slow, latent links. I would like to do a pre-run check, calculating how many plays, and tasks within each play, are going to run. The closest it seems is currently possible is to run --check and do a simple regex on the output. However, this takes quite some time, as all modules that support check mode will actually need to do work to determine what would change.
I would like to hook into Ansible to run each play and task, but not actually executing any modules; along the way, I’ll count and set an attribute that I can read later and display to determine how many tasks we’ve seen, and how many are left to go.
I’m not sure where in the code to start looking. I’d also like to try to make this a plugin(not sure if possible), as forking the all of ansible and trying to keep it in sync just sounds wrong.