I’m using AWX 3.0.1.0, Ansible 2.7.7 version. We have a custom Application with inventory host IPs in a file. How can I import these hosts into AWX inventory? I found reference to awx-manage in the internet. How can I install it? This command is not present in my AWX server. awx-manage function will solve my issue. Please let me know how to get it or how to import a text file containing host IPs into AWX inventory. Thanks, Mani
Hi Mani,
If you are using some version control tools to sync your project. You can define a inventory and source it from it. Whenever you want to update your inventory, you can simply pull and refresh your project.
Hope that helps.
Thanks
Thanks.
Hi Mani ,
Hope the following helps to resolve the issue -
To access awx-manage utility please go to the docker container using below command :
docker exec -it awx_web /bin/bash
awx-manage --help (Will show the user guide for awx-manage)
For example:-
- Enable docker awx_web via the following command -
docker exec -it awx_web /bin/bash
-
Uncomment the path of inventory file from /etc./ansible/ansible.cfg
-
Customize the host file to be used for inventory import
Under “Ungrouped hosts”, add below host IPs:
192.168.100.1
192.168.100.10
- Execute the following command to perform inventory import for inventory ID 5 -
#awx-manage inventory_import --source=/etc./ansible/hosts
–inventory-id=5
if the above steps does not help , please share your ansible.cfg details and the steps you are following .
Best Regards.