Hi,
I would like to skip certain tasks, however I would like to be informed that by the logic of the play, the task would have been executed. I have tagged all tasks that should be skipped, so I can exclude them with --skip-tags
, however that way I do not get any information about the task being skipped.
Why do I want to do this? I have inherited a large code base, and the large platform that once has been managed by this code base has deviated from the code base, because it has been modified without ansible.
Now if I just run the code base, chances are it messes up the platform, which must be avoided at all costs. Also, inside the codebase, some changes are done via the command module - yes, this is one reason to avoid, but again, inherited. Also, these changes are not so easy to do otherwise.
So I thought it be a good idea to tag all invocations of the command, then run ansible with --skip-tags my_command_could_change_stuff
, and check which command changes would do unexpected things. Then I can modify either my settings (host or group vars) or the platform in a controlled way, run ansible again, until things converge to an expected state.
However with --skip-tags
, the information about the task is lost completly.
Is there a way to show what has been skipped because of skipped tags?
Would a custom callback plugin help?
Or do I need to add extra code, like debug messages that inform that a task would have been run?