$ ansible all -i inventory/aws -m ping -vvvv
No config file found; using defaults
Loaded callback minimal of type stdout, v2.0
<
ec2-XXX-XXX-XXX-XXX.eu-west-1.compute.amazonaws.com> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1472737036.6-208605390381784 `" && echo ansible-tmp-1472737036.6-208605390381784="` echo $HOME/.ansible/tmp/ansible-tmp-1472737036.6-208605390381784 `" ) && sleep 0'
<
ec2-XXX-XXX-XXX-XXX.eu-west-1.compute.amazonaws.com> EXEC /bin/sh -c 'LANG=en_GB.UTF-8 LC_ALL=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8 /usr/bin/python /home/ec2-user/.ansible/tmp/ansible-tmp-1472737036.6-208605390381784/ping; rm -rf "/home/ec2-user/.ansible/tmp/ansible-tmp-1472737036.6-208605390381784/" > /dev/null 2>&1 && sleep 0'
"changed": false,
"invocation": {
"module_args": {
"data": null
},
"module_name": "ping"
},
"ping": "pong"
}
Everything works ok, but if i set the inventory to;
$ ansible all -i inventory/aws -m ping -vvvv
No config file found; using defaults
Loaded callback minimal of type stdout, v2.0
<
ec2-XXX-XXX-XXX-XXX.eu-west-1.compute.amazonaws.com> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ec2-user -o ConnectTimeout=10 -o ControlPath=/Users/graham/.ansible/cp/ansible-ssh-%h-%p-%r
ec2-XXX-XXX-XXX-XXX.eu-west-1.compute.amazonaws.com '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1472737048.41-168621408771185 `" && echo ansible-tmp-1472737048.41-168621408771185="` echo $HOME/.ansible/tmp/ansible-tmp-1472737048.41-168621408771185 `" ) && sleep 0'"'"''
"changed": false,
"msg": "Failed to connect to the host via ssh.",
"unreachable": true
}
It fails :/
Graham