# Ansible seems can not parse response from remote host due to locale issue.

**URL:** <https://forum.ansible.com/t/ansible-seems-can-not-parse-response-from-remote-host-due-to-locale-issue/18668>\
**Category:** Ansible Project\
**Created:** [July 3, 2015, 1:33am UTC](https://forum.ansible.com/t/ansible-seems-can-not-parse-response-from-remote-host-due-to-locale-issue/18668 "2015-07-03T01:33:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fengnan\_zhao](https://avatars.discourse-cdn.com/v4/letter/f/8e8cbc/32.png) [@fengnan\_zhao](https://forum.ansible.com/u/fengnan_zhao)\
**Post date:** [July 3, 2015, 1:33am UTC](https://forum.ansible.com/t/ansible-seems-can-not-parse-response-from-remote-host-due-to-locale-issue/18668/1 "2015-07-03T01:33:02Z")

</div>

Repost to fix some grammar error:

Hi guys, I am new to Ansible and playing some basic commands now.

I run the following command against different remote hosts, and found that the results are different :

_zhaof@fnz:~/work/tools $ ansible tffxa05l.unix.bla -m ping -u fengnaz1 --ask-pass_  
_SSH password:_  
_tffxa05l.unix.bla | success \>\> {_  
_“changed”: false,_  
_“ping”: “pong”_  
_}_

all good !

However when I run against another remote host, I got :

_zhaof@fnz:~/work/tools $ ansible tffxa04z.unix.bla -m ping -u fengnaz1 --ask-pass_  
_SSH password:_  
_tffxa04z.unix.bla | FAILED \>\> {_  
_“failed”: true,_  
_“msg”: “couldn’t set locale correctly\r\ncouldn’t set locale correctly\r\n/bin/sh: /usr/bin/python: not found\r\nOpenSSH\_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /etc/ssh/ssh\_config\r\ndebug1: /etc/ssh/ssh\_config line 56: Applying options for \*\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: mux\_client\_request\_session: master session id: 2\r\nShared connection to tffxa04z.unix.anz closed.\r\n”,_  
_“parsed”: false_  
_}_

It seems that the Ansible can not parse the response from tffxa04z . A locale problem ?

Has anyone experienced the similar issue? Can your pls share your insight and solution ?

thanks & regards

Fengnan

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [July 4, 2015, 5:07pm UTC](https://forum.ansible.com/t/ansible-seems-can-not-parse-response-from-remote-host-due-to-locale-issue/18668/2 "2015-07-04T17:07:25Z")

</div>

The issue seems to be that it is not finding python, its looking at  
/usr/bin/python, if python is elsewhere use ansible\_python\_interpreter  
for that host to point to the correct location.

---

<div class="post-metadata">

**Author:** ![fengnan\_zhao](https://avatars.discourse-cdn.com/v4/letter/f/8e8cbc/32.png) [@fengnan\_zhao](https://forum.ansible.com/u/fengnan_zhao)\
**Post date:** [July 5, 2015, 9:41am UTC](https://forum.ansible.com/t/ansible-seems-can-not-parse-response-from-remote-host-due-to-locale-issue/18668/3 "2015-07-05T09:41:12Z")

</div>

thanks Brian - that is exactly the problem. Tffxa04z doesn’t have python installed.

However, we assumed the ansible doesn’t rely on the the python/agent installed on the managed node - and that is why we chose Ansible over other tools ( puppet, chef or Salt ) .  
Is the SSHD running on the controlled node good enough ?

Our assumption seems to be wrong …

thanks & Regards

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [July 5, 2015, 6:56pm UTC](https://forum.ansible.com/t/ansible-seems-can-not-parse-response-from-remote-host-due-to-locale-issue/18668/4 "2015-07-05T18:56:39Z")

</div>

ansible does not require an agent, it does require python with json  
installed on the target though (as documented here  
[http://docs.ansible.com/intro\_installation.html#managed-node-requirements](http://docs.ansible.com/intro_installation.html#managed-node-requirements)).  
With out it you can still use ansible, but limited to the raw module  
(normally used to install python).
