# Inventory Sync with custom script

**URL:** <https://forum.ansible.com/t/inventory-sync-with-custom-script/26481>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [January 15, 2018, 6:41pm UTC](https://forum.ansible.com/t/inventory-sync-with-custom-script/26481 "2018-01-15T18:41:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sammic30](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@Sammic30](https://forum.ansible.com/u/Sammic30)\
**Post date:** [January 15, 2018, 6:41pm UTC](https://forum.ansible.com/t/inventory-sync-with-custom-script/26481/1 "2018-01-15T18:41:49Z")

</div>

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:**

[![](https://lh3.googleusercontent.com/-Wy4G6Q9pxN8/WlepU7x0X_I/AAAAAAAANm8/_S0Lp76dl6wQz7rM1mipdTIHIPBctmqAQCL4CGAYYCw/s320/Screen%2BShot%2B2018-01-11%2Bat%2B10.12.23%2BAM.png)](https://lh3.googleusercontent.com/-Wy4G6Q9pxN8/WlepU7x0X_I/AAAAAAAANm8/_S0Lp76dl6wQz7rM1mipdTIHIPBctmqAQCL4CGAYYCw/s1600/Screen%2BShot%2B2018-01-11%2Bat%2B10.12.23%2BAM.png)

**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

---

<div class="post-metadata">

**Author:** ![Rajat\_J](https://avatars.discourse-cdn.com/v4/letter/r/c4cdca/32.png) [@Rajat\_J](https://forum.ansible.com/u/Rajat_J)\
**Post date:** [January 28, 2018, 10:36am UTC](https://forum.ansible.com/t/inventory-sync-with-custom-script/26481/2 "2018-01-28T10:36:21Z")

</div>

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://github.com/whiskerlabs/armsible/blob/master/local_network_inventory.py) ([https://www.youtube.com/watch?v=E5XtK7mE8\_0&t=1s](https://www.youtube.com/watch?v=E5XtK7mE8_0&t=1s))

Regards  
Rajat
