Evaluating AWX and just got it installed. Set up Azure (Microsoft Azure Resource Manager) as a an Inventory Source and attempting to sync. It appears to be connecting ok, but AWX is saying we don’t have any hosts. We have a few hundred on this Azure account. Here are the logs from the sync job: 2017-09-19 20:45:51,675 INFO awx.main.commands.inventory_import Updating inventory 4: azure-prd9 2017-09-19 20:45:51,692 INFO awx.main.commands.inventory_import Reading Ansible inventory source: /usr/lib/python2.7/site-packages/awx/plugins/inventory/azure_rm.py 2017-09-19 20:45:58,095 INFO awx.main.commands.inventory_import Processing JSON output… 2017-09-19 20:45:58,095 DEBUG awx.main.commands.inventory_import Loaded group: all 2017-09-19 20:45:58,095 DEBUG awx.main.commands.inventory_import Loaded group: azure 2017-09-19 20:45:58,095 DEBUG awx.main.commands.inventory_import Adding child group azure to parent all 2017-09-19 20:45:58,095 DEBUG awx.main.commands.inventory_import Adding child group azure to parent all 2017-09-19 20:45:58,095 DEBUG awx.main.commands.inventory_import Finished loading from source: /usr/lib/python2.7/site-packages/awx/plugins/inventory/azure_rm.py 2017-09-19 20:45:58,096 DEBUG awx.main.commands.inventory_import Removing empty group azure 2017-09-19 20:45:58,096 INFO awx.main.commands.inventory_import Loaded 0 groups, 0 hosts 2017-09-19 20:45:58,178 INFO awx.main.commands.inventory_import Inventory variables unmodified 2017-09-19 20:45:58,181 DEBUG awx.main.models.inventory Going to update inventory computed fields 2017-09-19 20:45:58,217 DEBUG awx.main.models.inventory Finished updating inventory computed fields 2017-09-19 20:45:58,218 INFO awx.main.commands.inventory_import Inventory import completed for azure-prd9 in 6.5s Am I missing something? Thanks!
azure can be a little picky in it’s configuration. Can you get the expected results if you run the standalone inventory script (which is what awx itself uses): http://docs.ansible.com/ansible/latest/guide_azure.html#dynamic-inventory-script
Thanks, I was able to run the command manually without any issues. Perhaps there is a way for me to enable more detailed logging? Thanks again.
Which inventory script did you use to test with on Ansible itself?
I ran azure_rm.py
Testing it here it looks like it works for us. Without some more details on your authentication method and what you put in your .ini file and environment it’s hard to see where things are going wrong.
I got it to work. I found that when I select region as “All”, it does not work. Specifying a single region or multiple individual regions and it will work.
Thanks for the help.
That’s very interesting, let me see what’s up with that.
Nigel,
It looks like you’ve found a bug in awx! The good news is that it should be pretty simple to fix - I’m taking a look at it now.
In the meantime, your workaround (removing the region entirely) should accomplish what you’re looking for.
Thanks!
Cool. Shall I open a bug for you guys?
We’ll pick up the changes from our downstream hardening in a few days, so not strictly necessary.