Execute task only once in playbook (not per host)

Hi,

Currently implementing following scenario in ansible:

Auto generation of configurations of Bacula backup system, in single playbook I generate both client and server configs (server configs generated by delegete_to option to be on correct server)

For small amount of hosts everything worked fine, but when adding many hosts to single playbook execution I face problem that bacula server is restarted too fast and fails at some moment with error:

failed because start of the service was attempted too often.

But actually I need to restart bacula server just once for all hosts. (single run per playbook, not per host)

I did not find any solution for this, any recommendations/scenarios how we can achieve this?

Of course as alternative I can run restart bacula server as separate playbook run but I think all in one approach is more correct.

Hi!

I think you are looking for this:

http://docs.ansible.com/ansible/playbooks_delegation.html#run-once

Best,
Karol