How do i enable or install the awx-manage utility?
Ansible version: 2.5.2
Operating System: RH
type awx-manage at the command line to use the utility
should give the options to use the utility
[root]# awx-manage
-bash: awx-manage: command not found
Hey @doves99,
The awx issue tracker is for bug reporting and feature enhancement requests. For questions and assistance using awx, please check out our mailing list (https://groups.google.com/d/forum/awx-project), or the IRC chatroom on Freenode (#awx-devel).
for the love of got delete this thread because this is the only search result for this problem.
If it's the only search result for this problem (close to first result in Google), it means loads of people have issues with this that needs to be addressed.
It seems awx-manage does exist inside one of the docker containers, found inside /opt/awx/tools/docker-compose.
@Pakbon,
The google group link above should work just fine publicly. Here it is for me in a private Chrome window:
https://groups.google.com/forum/#!forum/awx-project

awx-manage is an executable that's available _inside_ awx containers; it's intended to used/run within an awx container, and isn't a third-party library you can download or install (it's a tool that is part of awx itself).
~/dev/awx docker exec -it tools_awx_run_3b2204dfbb4c bash
bash-4.2$ which awx-manage
/usr/local/bin/awx-manage
bash-4.2$ awx-manage --version
4.0.0-496-g13f9799
bash-4.2$ awx-manage list_instances
[awx capacity=99 policy=100%]
awx capacity=99 version=4.0.0-496-g13f9799 heartbeat="2019-05-08 16:09:04"
[1 capacity=99 policy=100%]
awx capacity=99 version=4.0.0-496-g13f9799 heartbeat="2019-05-08 16:09:04"
[2 capacity=99 policy=100%]
awx capacity=99 version=4.0.0-496-g13f9799 heartbeat="2019-05-08 16:09:04"
[3 capacity=99 policy=100%]
awx capacity=99 version=4.0.0-496-g13f9799 heartbeat="2019-05-08 16:09:04"
Fantastic non-answer...
@jrosa770 what exactly isn't answered? awx-manage is an executable that's installed by the AWX installer on the AWX nodes (Docker container, pod, what have you) - it's a Django-based diagnostic tool that lets you work with the local postgres database in a variety of ways that might affect your installation, and it's not something you can install or use outside of that context (because it doesn't make sense to use in a standalone environment outside of a container/pod, it isn't a Python package or RPM you install and use).
HI,
What they mean is that "awx-manage" must be run inside a container.
to do this first you need to know the container name, by executing:
sudo docker ps
Next you will see a list of all your running containers.
example:
root@awx:/var/lib/awx# sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
43297d309256 ansible/awx_task:9.1.0 "/tini -- /bin/sh -c…" 3 days ago Up 3 days 8052/tcp awx_task
5b1dc1253cb1 ansible/awx_web:9.1.0 "/tini -- /bin/sh -c…" 3 days ago Up 3 days 0.0.0.0:8080->8052/tcp awx_web
3b3344a7cd6b memcached:alpine "docker-entrypoint.s…" 3 days ago Up 3 days 11211/tcp awx_memcached
2d50fdf2ee35 postgres:10 "docker-entrypoint.s…" 3 days ago Up 3 days 5432/tcp awx_postgres
314f1f742751 ansible/awx_rabbitmq:3.7.4 "docker-entrypoint.s…" 3 days ago Up 3 days 4369/tcp, 5671-5672/tcp, 15671-15672/tcp, 25672/tcp awx_rabbitmq
To connect to a containers shell you must execute this command:
docker exec -it container_name bash
example:
root@awx:/var/lib/awx# docker exec -it awx_task bash
bash-4.4#
So now you are inside the awx_task containers bash shell.
Now you can use awx-manage command.
example:
#I created a add-hosts.txt file inside the container.
bash-4.4# vi add-hosts.txt
#I imported a list of hosts into awx inventory - UbuntuServers
bash-4.4# awx-manage inventory_import --inventory-name UbuntuServers --source add-hosts.txt
2.961 INFO Updating inventory 1: UbuntuServers
3.667 INFO Reading Ansible inventory source: /home/awx/add-hosts
3.671 INFO Using VIRTUAL_ENV: /var/lib/awx/venv/ansible
3.671 INFO Using PATH: /var/lib/awx/venv/ansible/bin:/var/lib/awx/venv/awx/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
3.671 INFO Using PYTHONPATH: /var/lib/awx/venv/ansible/lib/python3.6/site-packages:
5.123 ERROR ansible-inventory 2.8.5
5.123 ERROR config file = /etc/ansible/ansible.cfg
5.124 ERROR configured module search path = ['/home/awx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
5.124 ERROR ansible python module location = /usr/lib/python3.6/site-packages/ansible
5.124 ERROR executable location = /usr/bin/ansible-inventory
5.124 ERROR python version = 3.6.8 (default, Oct 7 2019, 17:58:22) [GCC 8.2.1 20180905 (Red Hat 8.2.1-3)]
5.124 ERROR Using /etc/ansible/ansible.cfg as config file
5.124 ERROR host_list declined parsing /home/awx/add-hosts as it did not pass it's verify_file() method
5.124 ERROR script declined parsing /home/awx/add-hosts as it did not pass it's verify_file() method
5.124 ERROR auto declined parsing /home/awx/add-hosts as it did not pass it's verify_file() method
5.124 ERROR Parsed /home/awx/add-hosts inventory source with ini plugin
5.125 INFO Processing JSON output...
5.125 INFO Loaded 0 groups, 20 hosts
2020-01-09 13:55:57,242 DEBUG awx.main.models.inventory Going to update inventory computed fields, pk=1
2020-01-09 13:55:57,322 DEBUG awx.main.models.inventory Finished updating inventory computed fields, pk=1, in 0.079 seconds
5.352 INFO Inventory import completed for (UbuntuServers - 11) in 2.4s
bash-4.4# exit
Most helpful comment
HI,
What they mean is that "awx-manage" must be run inside a container.
to do this first you need to know the container name, by executing:
sudo docker ps
Next you will see a list of all your running containers.
example:
To connect to a containers shell you must execute this command:
docker exec -it container_name bash
example:
So now you are inside the awx_task containers bash shell.
Now you can use awx-manage command.
example: