# Playbook fails on one remote server (running Gentoo), but succeedes on the rest 5 remote servers (running different version of CentOS)

**URL:** <https://forum.ansible.com/t/playbook-fails-on-one-remote-server-running-gentoo-but-succeedes-on-the-rest-5-remote-servers-running-different-version-of-centos/18580>\
**Category:** Ansible Project\
**Created:** [June 23, 2015, 2:21pm UTC](https://forum.ansible.com/t/playbook-fails-on-one-remote-server-running-gentoo-but-succeedes-on-the-rest-5-remote-servers-running-different-version-of-centos/18580 "2015-06-23T14:21:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dimitar\_Hristov](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@Dimitar\_Hristov](https://forum.ansible.com/u/Dimitar_Hristov)\
**Post date:** [June 23, 2015, 2:21pm UTC](https://forum.ansible.com/t/playbook-fails-on-one-remote-server-running-gentoo-but-succeedes-on-the-rest-5-remote-servers-running-different-version-of-centos/18580/1 "2015-06-23T14:21:55Z")

</div>

Hi Guys,

I’ve set up a Playbook to update ACLs on few servers (one running Gentoo, the others are CentOS). The Playbook works fine for the CentOS machines, but fails for the Gentoo one, here’s the error:

failed: [gsqtest] =\> {“failed”: true, “parsed”: false}

BECOME-SUCCESS-zizdmceeozmgzqpqixbpxrpnjjkfzghn  
File “/home/testuser/.ansible/tmp/ansible-tmp-1435069044.18-160883359153300/service”, line 417  
except IOError, err:  
^  
SyntaxError: invalid syntax  
debug1: mux\_client\_request\_session: master session id: 2  
Shared connection to gsqtest closed.

FATAL: all hosts have already failed – aborting

The Playbook has 2 tasks, the first finishes ok, the second one, which is to restart a service, fails.

Any idea what might be the issue?

Regards,  
Dimitar

---

<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:** [June 23, 2015, 2:44pm UTC](https://forum.ansible.com/t/playbook-fails-on-one-remote-server-running-gentoo-but-succeedes-on-the-rest-5-remote-servers-running-different-version-of-centos/18580/2 "2015-06-23T14:44:22Z")

</div>

on the gentoo machine you are hitting python v3, ansible needs v2 for it’s modules, you should either set ansible\_python\_interpreter for that host to point to the v2 python or change the default python to the v2 version.

---

<div class="post-metadata">

**Author:** ![Dimitar\_Hristov](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@Dimitar\_Hristov](https://forum.ansible.com/u/Dimitar_Hristov)\
**Post date:** [June 24, 2015, 6:00am UTC](https://forum.ansible.com/t/playbook-fails-on-one-remote-server-running-gentoo-but-succeedes-on-the-rest-5-remote-servers-running-different-version-of-centos/18580/3 "2015-06-24T06:00:09Z")

</div>

Hi Brian,

that’s absolutely right. I changed the default python and the playbook passed successfully.  
test tmp # eselect python list  
Available Python interpreters:  
[1] python2.7  
[2] python3.2 \*  
[3] python3.3  
test tmp # eselect python set python2.7  
test tmp # eselect python list  
Available Python interpreters:  
[1] python2.7 \*  
[2] python3.2  
[3] python3.3

Thanks,  
Dimitar
