# Stale Variables in Inventory

**URL:** <https://forum.ansible.com/t/stale-variables-in-inventory/25890>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [November 1, 2017, 6:38pm UTC](https://forum.ansible.com/t/stale-variables-in-inventory/25890 "2017-11-01T18:38:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cody\_John](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@Cody\_John](https://forum.ansible.com/u/Cody_John)\
**Post date:** [November 1, 2017, 6:38pm UTC](https://forum.ansible.com/t/stale-variables-in-inventory/25890/1 "2017-11-01T18:38:22Z")

</div>

I have a custom inventory script that pulls data from my CMDB into awx. I’ve noticed that even if a variable for a host or a group is removed in CMDB (and verified when running the script manually), the variable is not removed from the host or group in AWX. Is there a way to control this behavior? I would like the inventory script to be authoritative and anything that exists in AWX which isn’t returned in the inventory script should be removed.

---

<div class="post-metadata">

**Author:** ![matburt](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/matburt/32/3612_2.png) [@matburt](https://forum.ansible.com/u/matburt)\
**Post date:** [November 1, 2017, 6:50pm UTC](https://forum.ansible.com/t/stale-variables-in-inventory/25890/2 "2017-11-01T18:50:52Z")

</div>

Inventory Sources have an option called “Overwrite vars” that will fully replace all vars on an inventory item at sync time.

---

<div class="post-metadata">

**Author:** ![Cody\_John](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@Cody\_John](https://forum.ansible.com/u/Cody_John)\
**Post date:** [November 1, 2017, 7:05pm UTC](https://forum.ansible.com/t/stale-variables-in-inventory/25890/3 "2017-11-01T19:05:43Z")

</div>

Yeah just found that…duh. Sorry.
