# delegate\_to does not work for array of hosts passed in to role

**URL:** <https://forum.ansible.com/t/delegate-to-does-not-work-for-array-of-hosts-passed-in-to-role/18376>\
**Category:** Ansible Project\
**Created:** [June 2, 2015, 3:37am UTC](https://forum.ansible.com/t/delegate-to-does-not-work-for-array-of-hosts-passed-in-to-role/18376 "2015-06-02T03:37:38Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [July 24, 2015, 1:24pm UTC](https://forum.ansible.com/t/delegate-to-does-not-work-for-array-of-hosts-passed-in-to-role/18376/21 "2015-07-24T13:24:26Z")

</div>

The connection: local is used when you want a plugin to execute on  
master that normally would execute on the target. You normally want to  
do this with cloud modules or modules that use some web api. Some  
modules always execute on the 'master' as they are meant to just  
change the data in the play like, debug, set\_fact, add\_host, group\_by  
so these don't need any connection settings.

[Previous page](https://forum.ansible.com/t/delegate-to-does-not-work-for-array-of-hosts-passed-in-to-role/18376.md?page=1)
