If you want to track certain events like "playbook start", "play start",
"task start", you can write and use a custom callback plugin. You can
override the APIs like v2_playbook_on_task_start, v2_playbook_on_play_start
etc.
You need to write business logic inside these methods. You can check
existing callback plugins
https://github.com/ansible-collections/community.general/tree/master/plugins/callback

Let me know if you have any questions.


On Thu, Jun 25, 2020 at 2:43 PM Jagadeeshkumar Dittakavi <
[email protected]> wrote:

>
> I have a requirement where in I need to create a monitoring task to
> monitor other task completions (all are part of the same playbook). Mainly
> the monitoring task has to take certain actions based on the progress made
> by the running tasks.
>
> Essentially, I need a producer/consumer model where the producing tasks
> are the those who does some operations and notify the state changes to the
> consumer task to take certain decisions based on the progress.
>
> Is there any out of the box support in Ansible to have a task running as a
> monitoring task for certain event notifications. If there is no straight
> way to do this, please revert if there is any alternate way to archive the
> same.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/ab674034-5eae-450d-b5ef-00c3e568a0d6o%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/ab674034-5eae-450d-b5ef-00c3e568a0d6o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Thanks,
Abhijeet Kasurde

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAFwWkHpyNgOAL%2BtK_EZoBEbkRg2a8N0udvsEQtcBKEfeA2NvQg%40mail.gmail.com.

Reply via email to