This sounds like it could be related to https://github.com/ansible/ansible/issues/7535 ... please see if it is the same.
On Thu, May 29, 2014 at 3:51 PM, Stewart M <[email protected]> wrote: > I appear to be having a problem when trying to pass a list of hosts to > delegate_to, within a role. > > (Simplified examples to demonstrate the behavior I am seeing, using > freshly cloned version from Github) > > This works as expected: > > *site.yml* > > --- > > - name: test delegation > hosts: delegator.example.com > sudo: yes > tasks: > - name: delegate a task > command: /bin/date > delegate_to: "{{ item }}" > with_items: > - delegate1.example.com > - delegate2.example.com > > > > > This does not: > > *site.yml* > > - name: test delegation > hosts: delegator.example.com > sudo: yes > roles: > - delegator > > > > *roles/delegator/tasks/main.yml* > > --- > > - name: delegate a task > command: /bin/date > delegate_to: "{{ item }}" > with_items: > - delegate1.example.com > - delegate2.example.com > > > > failing with: > > fatal: [delegator.example.com] => SSH Error: data could not be sent to > the remote host. Make sure this host can be reached over ssh > > > Ideally, the list will come from somewhere else in actual use, but again, > keeping it simple to demonstrate the problem. > > Is this the expected behavior for delegation within a role, or am I doing > it wrong, or is Ansible doing it wrong? > > -- > 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 post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/e2ddacec-d515-46fe-a90a-277c155a02ef%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/e2ddacec-d515-46fe-a90a-277c155a02ef%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgwMvCn6OYR%2BF63pkh8PX%3DgxRDPeyA1M%2BgZK1p8RynfXDQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
