# Delegating tasks from multiple hosts to one

**URL:** <https://forum.ansible.com/t/delegating-tasks-from-multiple-hosts-to-one/20965>\
**Category:** Ansible Project\
**Created:** [March 23, 2016, 10:27am UTC](https://forum.ansible.com/t/delegating-tasks-from-multiple-hosts-to-one/20965 "2016-03-23T10:27:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Totterman](https://avatars.discourse-cdn.com/v4/letter/p/3ec8ea/32.png) [@Paul\_Totterman](https://forum.ansible.com/u/Paul_Totterman)\
**Post date:** [March 23, 2016, 10:27am UTC](https://forum.ansible.com/t/delegating-tasks-from-multiple-hosts-to-one/20965/1 "2016-03-23T10:27:14Z")

</div>

Hi,

I’m trying to delegate from multiple hosts to one in a play. Basically I’m trying to do something similar to puppet exported resources.

`

- hosts: slaves  
tasks:
- cron:  
name: ‘{{ansible\_fqdn}}’  
job: ‘rsync {{ansible\_fqdn}}:/srv/data /srv/backup/{{ansible\_fqdn}}/srv/data/’ # not really, but works for this example  
minute: 0 # example only  
hour: 0 # example only  
delegate\_to: master

`

However, after running this, only the cronjob for one slave host ends up on the master host. I also tried to write it as a loop using with\_items, with the same results: only one cronjob.

I was also planning on creating monitoring configs on a monitoring host by delegating from hosts that should be monitored. This would be a very reusable pattern.

Any ideas how to solve this?

Cheers,  
Paul
