hi,
I am looking for a way to stop Ansible execution if it doesn’t meet certain conditions through a plugin. A more concrete example: i want to check that tasks has certain variables defined and if they don’t - fail.
I first looked at callback plugins but they are not allowed to fail. task_queue_manager:send_callback has a comment: “# TODO: add config toggle to make this fatal or not?” and it simply catches any exceptions thrown by callback methods.
Is there any other way that one to get a hook into ansible execution lifecycle, do some inspection on variables and fail it if needed ?
Appreciate any help with this.