# Ansible on CentOS/RHEL 5

**URL:** <https://forum.ansible.com/t/ansible-on-centos-rhel-5/12924>\
**Category:** Ansible Project\
**Tags:** rhel, ansible-project\
**Created:** [June 7, 2013, 4:20pm UTC](https://forum.ansible.com/t/ansible-on-centos-rhel-5/12924 "2013-06-07T16:20:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [June 7, 2013, 4:20pm UTC](https://forum.ansible.com/t/ansible-on-centos-rhel-5/12924/1 "2013-06-07T16:20:10Z")

</div>

Got it.

So it seemed from your initial question you were trying to get it to work with yum, where yum is installed on the “box” python.

Apologies as I was confused. (It is definitely true that you only need 2.4 or higher on remote managed nodes)

In this case, you can just change the /usr/bin/ansible-playbook and /usr/bin/ansible shebang lines to /usr/bin/python26

And just let ansible execute /usr/bin/python as normal for local management so it will find yum.

---

<div class="post-metadata">

**Author:** ![Daniel\_PETISME](https://avatars.discourse-cdn.com/v4/letter/d/cab0a1/32.png) [@Daniel\_PETISME](https://forum.ansible.com/u/Daniel_PETISME)\
**Post date:** [June 7, 2013, 11:59pm UTC](https://forum.ansible.com/t/ansible-on-centos-rhel-5/12924/2 "2013-06-07T23:59:14Z")

</div>

> In this case, you can just change the /usr/bin/ansible-playbook and /usr/bin/ansible shebang lines to /usr/bin/python26

Indeed, I thought about this one too. But I wanted to use the git based installation and I would have maintain a gap between my local config and Ansible official version.

Neverminf, now it works.But please can you complete the section [http://ansible.cc/docs/gettingstarted.html#python-2-6-epel-instructions-for-rhel-and-centos-5](http://ansible.cc/docs/gettingstarted.html#python-2-6-epel-instructions-for-rhel-and-centos-5). I felt so frustrated to see an empty doc which matched exactly my problem 😕

Other point, why the is not Ansible EL 5 rpm in EPEL 5 repo ?

Cheers  
Daniel

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [June 8, 2013, 2:41am UTC](https://forum.ansible.com/t/ansible-on-centos-rhel-5/12924/3 "2013-06-08T02:41:29Z")

</div>

alternatively just stick a ‘python’ symlink in your path that points to the right interpreter.

It’s basically not in EL5 because most of the above hoops that I’m welcoming of patches to support EL5 RPM building. Easier to just manage from a EL6 machine in most cases.

---

<div class="post-metadata">

**Author:** ![Jeremy\_Schneider](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@Jeremy\_Schneider](https://forum.ansible.com/u/Jeremy_Schneider)\
**Post date:** [June 12, 2013, 1:59pm UTC](https://forum.ansible.com/t/ansible-on-centos-rhel-5/12924/4 "2013-06-12T13:59:04Z")

</div>

FYI, I’m using this on EL5. After doing yum install python26 python26-paramiko python26-PyYAML python26-jinja2 (from EPEL), I just edited the line PYTHON=python26 in the Makefile before running make install. Seems simple enough and everything works great. If the makefile could detect that var then everything would work unmodified out of the box… maybe I’ll think up a patch to suggest at some point. 🙂

-J

---

<div class="post-metadata">

**Author:** ![Luke\_Tislow1](https://avatars.discourse-cdn.com/v4/letter/l/cab0a1/32.png) [@Luke\_Tislow1](https://forum.ansible.com/u/Luke_Tislow1)\
**Post date:** [June 12, 2013, 2:00pm UTC](https://forum.ansible.com/t/ansible-on-centos-rhel-5/12924/5 "2013-06-12T14:00:49Z")

</div>

I think this is the same on CentOS 6 and RHEL 5/6 using epel, those  
packages are all the same from EPEL.
