Hi Abhijeet,

Thank you for prompt reply. Since I am newbie to Ansible didn't quite get 
why these callbacks are implemented in python. It would be great if you can 
send me an example, where we may register a callback that will be called by 
the play at desired state. Thank you inadvance.

On Thursday, June 25, 2020 at 3:00:43 PM UTC+5:30, Abhijeet Kasurde wrote:
>
> 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] <javascript:>> 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] <javascript:>.
>> 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/1a8778ef-fd74-47e4-8fd8-c5e2095a5103o%40googlegroups.com.

Reply via email to