I just solved similar issue, the problem is probably that you are
executing an older python (2.4) and importing the newer simplejson
(2.7). Try setting ansible_python_interpreter to the python2.7
executable.
BTW, you should only need paramiko on the 'manager' box for ping to succeed.
Hello everybody,
I’m super new to ansible. I just installed it following the instructions and configured my servername at the hosts file. When I try to do ping to my hosting I get this:
becca@becca-LAPTOP:/$ ansible all -m ping -vvvv
<sg111.servergrove.com> ESTABLISH CONNECTION FOR USER: bybeccae
<sg111.servergrove.com> REMOTE_MODULE ping
<sg111.servergrove.com> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/home/becca/.ansible/cp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘Port=22123’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=bybeccae’, ‘-o’, ‘ConnectTimeout=10’, ‘sg111.servergrove.com’, “/bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1408354432.25-81121490636964 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1408354432.25-81121490636964 && echo $HOME/.ansible/tmp/ansible-tmp-1408354432.25-81121490636964’”]
<sg111.servergrove.com> PUT /tmp/tmpvlo17x TO mkdir: cannot create directory //.ansible': Permission denied/ping <sg111.servergrove.com> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/home/becca/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'Port=22123', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'User=bybeccae', '-o', 'ConnectTimeout=10', 'sg111.servergrove.com', u'/bin/sh -c \'LANG=C LC_CTYPE=C /usr/bin/python mkdir: cannot create directory
//.ansible'“'”': Permission denied/ping'‘]
sg111.servergrove.com | FAILED >> {
“failed”: true,
“msg”: "/bin/sh: -c: line 0: unexpected EOF while looking for matching ``’\r\n/bin/sh: -c: line 1: syntax error: unexpected end of file\r\nOpenSSH_5.9p1 Debian-5ubuntu1.4, OpenSSL 1.0.1 14 Mar 2012\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_request_forwards: requesting forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 7261\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to sg111.servergrove.com closed.\r\n",
“parsed”: false
}
my hosts file looks like this:
This is the default ansible ‘hosts’ file.
(A) First question, what version of Ansible are you running?
(B) Second question, have you configured the ansible temp path in ansible.cfg or as an environment variable, and if so what is it set to?
Thanks!