Did some more reading and found out action_plugin may be the right way to go. Can we have a global action_plugin that runs before all module executions? So that I can check for a skip flag and skip module executions?
Please advise if there is a better way of going about this. Thanks On Saturday, 10 December 2016 01:20:59 UTC-5, Mumshad Mannambeth wrote: > > I would like to skip a task or all tasks conditionally in my > callback_plugin. Is that possible? I am trying to implement a stop playbook > feature where I query an external API in my callback_plugin, and if a stop > flag is raised, I would like to skip all remaining tasks in the playbook or > simply kill the playbook after the current running task. Note, I need to > wait for the current running task to finish before exiting the playbook. > Appreciate any ideas. > > Is this called before or after the task has actually started? > > def v2_playbook_on_task_start(self, task, is_conditional): > > -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
