Failed to ping linux machine having python version 3.5.1

I am trying to ping a linux machine having python version 3.5.1+, but I am facing the following error.

ansible -m ping linux1

1.1.1.2 | FAILED! => {
“changed”: false,
“failed”: true,
“msg”: “Traceback (most recent call last):\r\n File "//test/log/tmp/ansible-tmp-1463555484.41-81681372152272/ping", line 44, in \r\n import exceptions\r\nImportError: No module named ‘exceptions’\r\n”,
“parsed”: false
}

Ansible version of my ansible controller is 2.0.0

When I tried pinging a linux machine having python version 2.7.9, it is working properly.

Hi Mick,

At the moment you’ll need a python 2 installation your linux machine - see the blue boxes here http://docs.ansible.com/ansible/intro_installation.html#managed-node-requirements - there’s an example of using ‘raw’ to put a python 2 and simplejson on there.

I know the developers are working hard on adding python 3 support but this is going to take a while as ansible still supports managing machines running python 2.4. They’ve actually done loads on python 3 support already, there is a lot of work involved.

Jon