AWX + ARA in containers

Good Afternoon AWX community,

Has anyone setup AWX and ARA together on docker? Or have a blog/reference on the experience?

It seems like it should be pretty straightforward, but ansible-playbook runs aren’t picking up the callback_modules I expected from ansible.cfg.

Is this something to do with the custom AWX callback module, or am I missing something else about AWX here? I’ve set this up with a vanilla Ansible project and this was all the config it needed so I’m hoping I just missed a change somewhere?

in the awx_task container I’ve pip installed ara, and set values in /etc/ansible/ansible.cfg like:


[defaults]
callback_plugins=/usr/lib/python2.7/site-packages/ara/plugins/callbacks 
action_plugins=/usr/lib/python2.7/site-packages/ara/plugins/actions

The play seems to use the right config, but I see no mention of the ARA plugin being loaded or the var's I've set being picked up.


ansible-playbook 2.7.6

3
  config file = /etc/ansible/ansible.cfg

4
  configured module search path = [u'/var/lib/awx/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']

5
  ansible python module location = /usr/lib/python2.7/site-packages/ansible

6
  executable location = /usr/bin/ansible-playbook

7
  python version = 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]

8
Using /etc/ansible/ansible.cfg as config file

9
setting up inventory plugins

10
/tmp/awx_1451_nf2qogg3/tmp78yh1dh6 did not meet host_list requirements, check plugin documentation if this is unexpected

11
Parsed /tmp/awx_1451_nf2qogg3/tmp78yh1dh6 inventory source with script plugin

12
statically imported: /var/lib/awx/projects/_55__project1/roles/nginx/tasks/default_nginx.yml

13
Loading callback plugin awx_display of type stdout, v2.0 from /var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/lib/awx_display_callback/module.pyc

I’m able to get the values set by exporting them on the command line inside the awx_task container, and then running ansible-config dump which shows the expected:

DEFAULT_ACTION_PLUGIN_PATH(env: ANSIBLE_ACTION_PLUGINS) = [u'/usr/lib/python2.7/site-packages/ara/plugins/actions'] ... DEFAULT_CALLBACK_PLUGIN_PATH(env: ANSIBLE_CALLBACK_PLUGINS) = [u'/usr/lib/python2.7/site-packages/ara/plugins/callbacks']

But the values are set to the default at run time and I’m not sure where best to set them for AWX runs to respect them.

Thanks!

You can add environment variables at deployment time by just adding more vars to the playbook you’re using to deploy AWX. For example, if you’re doing a local docker deployment, add env vars to the file https://github.com/ansible/awx/blob/devel/installer/roles/local_docker/tasks/standalone.yml under the awx_web and awx_task containers.