Currently, if you have multiple inventory sources for an inventory, they are synced individually.
This leads to:
We should move to not doing individual inventory source syncs. Instead, we should, when an inventory is synced, run a single ansible-inventory process passing all inventory sources.
Note: this will be a behavior change that will change how inventory is computed. It will also change the mechanism such that "overwrite" and "overwrite vars" should not be used for individual sources.
hi @wenottingham , I just ran into https://github.com/ansible/awx/issues/1997 and was wondering if when this feature is implemented it may also delete the no longer used group_vars/all from the inventory if the overwrite flag is set? I found it quite confusing as I had deleted a variable from my group_vars/all which didn't propogate to the inventory. It would be nice to add that feature to this enhancement if possible.
Possibly doable with this, yes.
We also ran into the same problem while refactoring our inventory. It's very confusing and dangerous that deletion of variables in group_vars/all doesn't propagate to the inventory. I suggest to increase priority on this issue.
Echoing what @abedwardsw stated on overwriting the global vars.
At the very least, there could either be:
Most helpful comment
We also ran into the same problem while refactoring our inventory. It's very confusing and dangerous that deletion of variables in group_vars/all doesn't propagate to the inventory. I suggest to increase priority on this issue.