Can't ping ESXi 5.5

368 views
Skip to first unread message

Huan He

unread,
May 26, 2016, 12:24:12 PM5/26/16
to Ansible Project
Hi,

I did the cmd "ansible esxi -u root -m ping -vvvv" and got "ImportError: No module named grp". see full msg below. What I understand is that the ESXi 5.5 has python 2.6.8 and it may not have the full python standard pkgs from my googling. I wonder if there is any workarounds to make it working?

Thanks,
Huan


Loaded callback minimal of type stdout, v2.0

<20.200.30.151> ESTABLISH SSH CONNECTION FOR USER: root

<20.200.30.151> 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=root -o ConnectTimeout=10 -o ControlPath=/home/huhe/.ansible/cp/ansible-ssh-%h-%p-%r -tt 20.200.30.151 '/bin/sh -c '"'"'mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1464223343.0-27880096828872 `" && echo "` echo $HOME/.ansible/tmp/ansible-tmp-1464223343.0-27880096828872 `"'"'"''

<20.200.30.151> PUT /tmp/tmpJxH4sx TO //.ansible/tmp/ansible-tmp-1464223343.0-27880096828872/ping

<20.200.30.151> SSH: EXEC sftp -b - -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=root -o ConnectTimeout=10 -o ControlPath=/home/huhe/.ansible/cp/ansible-ssh-%h-%p-%r '[20.200.30.151]'

<20.200.30.151> ESTABLISH SSH CONNECTION FOR USER: root

<20.200.30.151> 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=root -o ConnectTimeout=10 -o ControlPath=/home/huhe/.ansible/cp/ansible-ssh-%h-%p-%r -tt 20.200.30.151 '/bin/sh -c '"'"'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python //.ansible/tmp/ansible-tmp-1464223343.0-27880096828872/ping; rm -rf "//.ansible/tmp/ansible-tmp-1464223343.0-27880096828872/" > /dev/null 2>&1'"'"''

20.200.30.151 | FAILED! => {

    "changed": false, 

    "failed": true, 

    "invocation": {

        "module_name": "ping"

    }, 

    "module_stderr": "OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: 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 = 8846\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\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 20.200.30.151 closed.\r\n", 

    "module_stdout": "Traceback (most recent call last):\r\n  File \"//.ansible/tmp/ansible-tmp-1464223343.0-27880096828872/ping\", line 123, in <module>\r\n    import grp\r\nImportError: No module named grp\r\n", 

    "msg": "MODULE FAILURE", 

    "parsed": false

}

Kai Stian Olstad

unread,
May 27, 2016, 4:39:05 AM5/27/16
to ansible...@googlegroups.com
On 26.05.2016 06:27, Huan He wrote:
> I did the cmd "ansible esxi -u root -m ping -vvvv" and got
> "ImportError: No
> module named grp". see full msg below. What I understand is that the
> ESXi
> 5.5 has python 2.6.8 and it may not have the full python standard pkgs
> from
> my googling. I wonder if there is any workarounds to make it working?

I'm using Ansible 2.1.0 and ESXi 5.5 and Ansible ping works for me.
I also use Ansibles command and file modules without any problem.

My 5.5 har Python 2.7.8 and has the grp module in Python.

--
Kai Stian Olstad

Mahi

unread,
Jun 3, 2016, 11:45:09 AM6/3/16
to Ansible Project
Same issue for me also, Could any one help us.


Mahi.
Reply all
Reply to author
Forward
0 new messages