# Ansible, GCE, command: make and weird issues

**URL:** <https://forum.ansible.com/t/ansible-gce-command-make-and-weird-issues/17619>\
**Category:** Ansible Project\
**Created:** [February 25, 2015, 10:24am UTC](https://forum.ansible.com/t/ansible-gce-command-make-and-weird-issues/17619 "2015-02-25T10:24:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eliran](https://avatars.discourse-cdn.com/v4/letter/e/71c47a/32.png) [@eliran](https://forum.ansible.com/u/eliran)\
**Post date:** [February 25, 2015, 10:24am UTC](https://forum.ansible.com/t/ansible-gce-command-make-and-weird-issues/17619/1 "2015-02-25T10:24:11Z")

</div>

Hi,

The weirdest problem.  
When I run the following from my Mac laptop, all good.  
When I run on from a VM on GCE (Google Cloud Engine), I get the following errors.  
I guess it’s a problem with something related to ansible itself, but I can’t find out what it is.

`

**Tasks**

- name: Download OpenCV3 Source  
get\_url: url=[https://github.com/Itseez/opencv/archive/3.0.0-beta.zip](https://github.com/Itseez/opencv/archive/3.0.0-beta.zip) dest=/tmp/opencv-3.0.0-beta.zip
- name: Create A Folder - OpenCV3  
file: path=/tmp/opencv-3.0.0-beta state=directory
- name: Unarchive OpenCV3  
unarchive: src=/tmp/opencv-3.0.0-beta.zip dest=/tmp copy=no creates=/tmp/opencv-3.0.0-beta/LICENSE
- name: Create a Folder - OpenCV3/Build  
file: path=/tmp/opencv-3.0.0-beta/build state=directory  
notify:
- CMake OpenCV
- Make
- Make Install

**Handlers**

---

<div class="post-metadata">

**Author:** ![Eric\_Johnson](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@Eric\_Johnson](https://forum.ansible.com/u/Eric_Johnson)\
**Post date:** [February 25, 2015, 5:49pm UTC](https://forum.ansible.com/t/ansible-gce-command-make-and-weird-issues/17619/2 "2015-02-25T17:49:50Z")

</div>

Looks like a character encoding issue. One of your traceback errors is:

UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe2 in position 3672: ordinal not in range(128)

And the prior ansible command was setting LANG=C and LC\_TYPE=C

…ConnectTimeout=15 PasswordAuthentication=no ‘LANG=C LC\_CTYPE=C /usr/bin/python /root/.ansible/tmp/ansible-tmp-1424858592.85-146021682777198/command; rm -rf /root/.ansible/tmp/ansible-tmp-1424858592.85-146021682777198/ \>/dev/null 2\>&1’

I don’t know how to change that, but if you can set it to UTF8, I bet your problems will go away.

---

<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:** [February 25, 2015, 5:55pm UTC](https://forum.ansible.com/t/ansible-gce-command-make-and-weird-issues/17619/3 "2015-02-25T17:55:39Z")

</div>

Try using the environment directive to set the locale for the task.

---

<div class="post-metadata">

**Author:** ![eliran](https://avatars.discourse-cdn.com/v4/letter/e/71c47a/32.png) [@eliran](https://forum.ansible.com/u/eliran)\
**Post date:** [February 25, 2015, 6:46pm UTC](https://forum.ansible.com/t/ansible-gce-command-make-and-weird-issues/17619/4 "2015-02-25T18:46:32Z")

</div>

You guys are awesome, the issue was fixed.  
The solution:  
Edit /etc/ansible/ansible.cfg and comment out the module\_lang:

#module\_lang = C

A little explanation:  
The issue was that the connection to the servers set the lang to be C, so disabling it changed it to default:

GOOD: /bin/sh -c 'LANG=en\_US.UTF-8 LC\_CTYPE=en\_US.UTF-8

instead of:

BAD: /bin/sh -c 'LANG=C LC\_CTYPE=C

Thanks, hope it helps - god knows I went crazy over this.
