Customizing ansible install location and along with dependencies - RHEL 5

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.

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.

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).

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.

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