Inventory Sync with custom script

Hi,

I’m trying to create/update the inventory with custom script. Jobs logs and UI is showing it’s successful but actually it’s not updating.

Any suggestion would be appreciated!!!

UI:

Job output:
2018-01-11 18:09:09,795 INFO awx.main.commands.inventory_import Updating inventory 5: Dict-A 2018-01-11 18:09:09,809 DEBUG awx.main.commands.inventory_import Using system install of ansible-inventory CLI: /bin/ansible-inventory 2018-01-11 18:09:09,810 INFO awx.main.commands.inventory_import Reading Ansible inventory source: /tmp/awx_inventory_EbTlRj/tmp__ReXr 2018-01-11 18:09:11,243 INFO awx.main.commands.inventory_import Processing JSON output… 2018-01-11 18:09:11,243 DEBUG awx.main.commands.inventory_import Loaded group: all 2018-01-11 18:09:11,243 DEBUG awx.main.commands.inventory_import Finished loading from source: /tmp/awx_inventory_EbTlRj/tmp__ReXr 2018-01-11 18:09:11,243 INFO awx.main.commands.inventory_import Loaded 0 groups, 0 hosts 2018-01-11 18:09:11,247 INFO awx.main.commands.inventory_import Inventory variables unmodified 2018-01-11 18:09:11,251 DEBUG awx.main.models.inventory Going to update inventory computed fields 2018-01-11 18:09:11,300 DEBUG awx.main.models.inventory Finished updating inventory computed fields 2018-01-11 18:09:11,301 INFO awx.main.commands.inventory_import Inventory import completed for Dict-A in 1.5s

Hi,

Using below github I have also try adding one subnet scan to add vm’s to my AWX.

https://github.com/whiskerlabs/armsible/blob/master/local_network_inventory.py (https://www.youtube.com/watch?v=E5XtK7mE8_0&t=1s)

Regards
Rajat