Running multiple ansible version on awx against virtualenv

422 views
Skip to first unread message

mamado...@gmail.com

unread,
Apr 24, 2018, 11:23:05 AM4/24/18
to AWX Project
Hi there,

I have awx running as well, so I can run playbooks through it but I would like to have multiple ansible  version (e.g 2.4 and 2.5) on awx since I aim to interact with different modules and don't want to upgrade my existing  ansible rather than create an isolated ansible version (2.5).

In order to cover, I learned from internet how virtualenv works with awx.
I created a virtual environment for ansible 2.5 by taping following commands in awx server:

virtualenv /var/lib/awx/venv/my-custom-venv
/var/lib/awx/venv/my-custom-venv/bin/pip install python-memcached psutil
/var/lib/awx/venv/my-custom-venv/bin/pip install -U "ansible == X.Y.Z"

All commands performed very well and I can verify through the browser that
my-custom-venv appeared in  https://my-awx-server/api/v2/config/

{ "custom_virtualenvs": [ "/var/lib/awx/venv/my-custom-venv/", "/var/lib/awx/venv/my-other-custom-venv/" ],
---

Fact
: awx don't display my-custom-venv as selectable options for Organizations, Projects, and Job Templates

Is there something missed ?

I am still learning awx that's why I am looking for someone who can  guide me.

Thanks in advance,

Matthew Jones

unread,
Apr 24, 2018, 1:13:33 PM4/24/18
to mamado...@gmail.com, AWX Project
Interesting, can you report this as an issue in our issue tracker?

As an alternative you may can use our browseable api (via http://awxhost/api/ in your browser) to patch in the right path on the job template you are using.  The browsable api has an input box if you navigate to the job template you are interested in (/api/v2/job_templates/n/, where n is the job template number).

--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project+unsubscribe@googlegroups.com.
To post to this group, send email to awx-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/7859aad8-e086-496f-a085-652cf66a52a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Matt Jones
Principal Software Engineer
Ansible Tower

mamado...@gmail.com

unread,
Apr 24, 2018, 5:50:24 PM4/24/18
to AWX Project


Le mardi 24 avril 2018 19:13:33 UTC+2, Matthew Jones a écrit :
Interesting, can you report this as an issue in our issue tracker?
Do you mean to push it here https://github.com/ansible/awx/issues
 
As an alternative you may can use our browseable api (via http://awxhost/api/ in your browser) to patch in the right path on the job template you are using.  The browsable api has an input box if you navigate to the job template you are interested in (/api/v2/job_templates/n/, where n is the job template number).
yes, I was able to assign my_custom_env to an organization, or a project or a job template through the api but I can't modify an existing  organization with this method since just only GET, POST are supported.
But anyway, it works by adding a new organization.

Thanks Matthew,
Warmly

On Tue, Apr 24, 2018 at 11:23 AM, <mamado...@gmail.com> wrote:
Hi there,

I have awx running as well, so I can run playbooks through it but I would like to have multiple ansible  version (e.g 2.4 and 2.5) on awx since I aim to interact with different modules and don't want to upgrade my existing  ansible rather than create an isolated ansible version (2.5).

In order to cover, I learned from internet how virtualenv works with awx.
I created a virtual environment for ansible 2.5 by taping following commands in awx server:

virtualenv /var/lib/awx/venv/my-custom-venv
/var/lib/awx/venv/my-custom-venv/bin/pip install python-memcached psutil
/var/lib/awx/venv/my-custom-venv/bin/pip install -U "ansible == X.Y.Z"

All commands performed very well and I can verify through the browser that
my-custom-venv appeared in  https://my-awx-server/api/v2/config/

{ "custom_virtualenvs": [ "/var/lib/awx/venv/my-custom-venv/", "/var/lib/awx/venv/my-other-custom-venv/" ],
---

Fact
: awx don't display my-custom-venv as selectable options for Organizations, Projects, and Job Templates

Is there something missed ?

I am still learning awx that's why I am looking for someone who can  guide me.

Thanks in advance,

--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.

To post to this group, send email to awx-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/7859aad8-e086-496f-a085-652cf66a52a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages