I just ran into this same issue. As alluded to above, adding this line to my inventory resolved the issue.
localhost ansible_connection=local In my case, I was passing an explicit user and private-key on the command line which were not set up on my machine. Should there be a note added to this module about the situation of trying to SSH to the local machine? I like how this module is trying to hide some of the complexity of it actually being a local command run but delegated to localhost but this ended up being a difficult thing to troubleshoot. On Wednesday, May 14, 2014 2:37:48 AM UTC-4, Ernest0x wrote: > > On 05/13/2014 10:49 PM, Michael DeHaan wrote: > > It depends if localhost is in inventory or not, but there is nothing to > presume an explicit entry of localhost has requested a particular way to > connect. > > But it is indeed presumed to connect through ssh, probably because this is > the default for all hosts with undefined ansible_connection/connection. So, > I am thinking that perhaps it would be better default behavior to make a > sensible exception for localhost and choose 'local' connection (when > 'ansible_connection' is undefined and 'connection' in the playbook not set). > -- 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/d2977dda-2781-4524-a643-54526af1f726%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
