# Customizing ansible install location and along with dependencies - RHEL 5

**URL:** <https://forum.ansible.com/t/customizing-ansible-install-location-and-along-with-dependencies-rhel-5/12658>\
**Category:** Ansible Project\
**Tags:** rhel\
**Created:** [April 10, 2013, 6:20am UTC](https://forum.ansible.com/t/customizing-ansible-install-location-and-along-with-dependencies-rhel-5/12658 "2013-04-10T06:20:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![VK1](https://avatars.discourse-cdn.com/v4/letter/v/bbce88/32.png) [@VK1](https://forum.ansible.com/u/VK1)\
**Post date:** [April 10, 2013, 6:20am UTC](https://forum.ansible.com/t/customizing-ansible-install-location-and-along-with-dependencies-rhel-5/12658/1 "2013-04-10T06:20:52Z")

</div>

Q: What's the easiest way to install ansible along with its python dependencies under say /opt/ansible/... ?

Took a quick look at the Makefile and it doesn't seem built for this. However, I don't do this often so maybe I'm missing something.

Specifically, rather than using EPEL, we'd want to build python 2.6 and any modules needed (yaml, crypto, paramiko, jinja2, etc.) in a self-contained directory tree on both a "master" trusted machine as well as clients (where I realize fewer modules are needed).

The python part isn't too hard; the integration with ansible may be.

---

<div class="post-metadata">

**Author:** ![Antonio\_Messina](https://avatars.discourse-cdn.com/v4/letter/a/9de053/32.png) [@Antonio\_Messina](https://forum.ansible.com/u/Antonio_Messina)\
**Post date:** [April 10, 2013, 7:08am UTC](https://forum.ansible.com/t/customizing-ansible-install-location-and-along-with-dependencies-rhel-5/12658/2 "2013-04-10T07:08:58Z")

</div>

I don't know other people, but I'm using /srv/ansible to store my  
playbooks and a virtual environment. I also have a bootstrap playbook  
to build the virtualenv, download the other playbooks and install  
ansible which is included in my post-installation script (my machines  
are installed via pxe)

.a.

---

<div class="post-metadata">

**Author:** ![Benjamin\_Ritcey](https://avatars.discourse-cdn.com/v4/letter/b/e495f1/32.png) [@Benjamin\_Ritcey](https://forum.ansible.com/u/Benjamin_Ritcey)\
**Post date:** [April 10, 2013, 3:21pm UTC](https://forum.ansible.com/t/customizing-ansible-install-location-and-along-with-dependencies-rhel-5/12658/3 "2013-04-10T15:21:35Z")

</div>

As a minor point of clarification, you only need Python 2.4 + python-simplejson on the clients. I have a bunch of RHEL 5 machines I’m managing and only needed to ‘yum install -y python-simplejson’ via the ‘raw’ module to get them going.

(I’m not using RHEL 5 on the management node, so python 2.6 was not an issue).

---

<div class="post-metadata">

**Author:** ![Antonio\_Messina](https://avatars.discourse-cdn.com/v4/letter/a/9de053/32.png) [@Antonio\_Messina](https://forum.ansible.com/u/Antonio_Messina)\
**Post date:** [April 10, 2013, 3:25pm UTC](https://forum.ansible.com/t/customizing-ansible-install-location-and-along-with-dependencies-rhel-5/12658/4 "2013-04-10T15:25:01Z")

</div>

> As a minor point of clarification, you only need Python 2.4 +  
> python-simplejson on the clients. I have a bunch of RHEL 5 machines I'm  
> managing and only needed to 'yum install -y python-simplejson' via the 'raw'  
> module to get them going.

That's correct, I need to create a virtualenv and install ansible  
because I am using ansible in pull mode, so ansible is actually  
running on the managed mode.

.a.

---

<div class="post-metadata">

**Author:** ![Benjamin\_Ritcey](https://avatars.discourse-cdn.com/v4/letter/b/e495f1/32.png) [@Benjamin\_Ritcey](https://forum.ansible.com/u/Benjamin_Ritcey)\
**Post date:** [April 10, 2013, 3:34pm UTC](https://forum.ansible.com/t/customizing-ansible-install-location-and-along-with-dependencies-rhel-5/12658/5 "2013-04-10T15:34:27Z")

</div>

> That’s correct, I need to create a virtualenv and install ansible  
> because I am using ansible in pull mode, so ansible is actually  
> running on the managed mode.

Ah-ha - yes, that changes things.

As to your question - not a direct answer, but take a look at hacking/env-setup in the git repo - that allows running Ansible right from checkout and may be enough for your needs or at least point you in the right direction.

HTH

-b
