naftulikay / ansible-role-degoss

An Ansible role for installing, running, and removing Goss from a system without leaving any traces.
Other
42 stars 12 forks source link

Make Cleanup Handlers Always Run #3

Closed naftulikay closed 7 years ago

naftulikay commented 7 years ago

Right now if tests fail, handlers don't run and things aren't cleaned up.

naftulikay commented 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.

sagagliardo commented 7 years ago

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

naftulikay commented 7 years ago

Closed by #6.