is there a runner_on_start() in CallbackModule

Hi,
I want to track the progress of a Task execution. I get the runner_on_ok() and runner_on_failed() but i want to callback for runner_on_start().

Is there such a callback available ?

Ritesh

The playbook_on_task_start may be the one you need. It’s called once per task (regardless of the number of hosts).

Take a look at the noop callback source: https://github.com/ansible/ansible/blob/devel/lib/ansible/callback_plugins/noop.py

The callbacks are usually called in the following sequence:

  • playbook_on_start (once for each playbook file)
  • playbook_on_vars_prompt (for each play, before play starts)
  • playbook_on_play_start (once for each play)
  • playbook_on_import_for_host
  • playbook_on_not_import_for_host
  • playbook_on_no_hosts_matched
  • playbook_on_no_hosts_remaining
  • playbook_on_setup
  • runner_on_* (once for each host)- playbook_on_task_start (once for each task within a play)
  • runner_on_* (once for each host)- playbook_on_notify (once for each notification from the play)- playbook_on_stats

Hi Chris
I am using task on start currently , but problem is that , it runs at task level and doesnt give me details when it is run for a host.

Ritesh