Cannot get local connection to work

Hi,

I started playing with ansible playbooks and hit a wall with local connections.

I was trying to gather some data (VM ssh keys to build a known_hosts file) from a few hosts and postprocess them locally.

The playbook looks like:

Plays have a connection parameter, not tasks.

The gist you linked to is not official documentation.

W dniu 27.07.2012 14:48, Michael DeHaan pisze:

Plays have a connection parameter, not tasks.

OK.

The gist you linked to is not official documentation.

I know, I hoped it wasn't wrong :wink: Still, what about the error trying to
do anything with --connection local?

# ansible local --connection local -m ping
127.0.0.1 | FAILED >> {
    "failed": true,
    "module": "ping",
    "msg": "",
    "parsed": false
}

Not sure how to start debugging this one (strace didn't prove too useful).

Best regards,
Grzegorz Nosek

I know, I hoped it wasn’t wrong :wink: Still, what about the error trying to
do anything with --connection local?

For starters, are you using the latest git?

W dniu 27.07.2012 14:59, Michael DeHaan pisze:

I know, I hoped it wasn't wrong :wink: Still, what about the error trying to
do anything with --connection local?

For starters, are you using the latest git?

Yes.

commit d55012e57030a085cc1ebbe6a7016dccdfa6c192
Merge: 0c61d04... 9253d89...
Author: Michael DeHaan <michael.dehaan@gmail.com>

    Merge pull request #704 from lorin/gitfix

    git module: Don't pass rc as separate arg to fail_json

Updated a second ago (one commit was new), still the same.

If that matters, ansible lives in a private virtualenv (note: I had to
add its lib subdirectory to a .pth file to run it at all).
/usr/bin/python is 2.4.x, ansible is running on 2.7.x.

Best regards,
Grzegorz Nosek