Closed naftulikay closed 7 years ago
A solution to this outside of force_handlers
is to basically allow the task to fail, store the result in a variable, and fail after cleanup.
Moved cleanup just into the main tasks run instead of running it as a handler. If nothing changes, handlers don't run -- at all. So it's better they just always run at the end.
See https://github.com/naftulikay/ansible-role-degoss/pull/4
Closed by #6.
Right now if tests fail, handlers don't run and things aren't cleaned up.