Awx: Change how multiple inventory sources are synced

Created on 26 Apr 2019  路  4Comments  路  Source: ansible/awx

ISSUE TYPE
  • Feature Idea
SUMMARY

Currently, if you have multiple inventory sources for an inventory, they are synced individually.
This leads to:

  • confusing (and potentially deadlock-y) behavior
  • a difference to how multiple inventory sources are used when you do it on the command line

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.

api ui medium enhancement

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.

All 4 comments

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:

  • an additional checkbox "overwrite global vars"
  • simple code change to overwrite global vars if only one inventory source is specified
Was this page helpful?
0 / 5 - 0 ratings