Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add more detailed documentation on how to use multiple inventories #47586
Add a separate section on how to use multiple inventory directories with an example.
This seems to be an undocumented feature related to "multiple sources" described in Working with dynamic inventory. Multiple sources documentation talks about using a directory and having multiple different inventory sources inside the directory. The new documented use case is different as it uses multiple inventory directories to promote DRY principle. The new documentation is in line with the comments in #36600 by @bcoca.
Using multiple directories is a bit cumbersome because you need to use multiple
I understand if this is not a feature you want to promote in the docs, it resolved some issues for me so I thought that I'll try documenting it.
Comments appreciated :)
Tested the example with 2.7. Should also work at least with 2.6.
I had another look on the dynamic inventory docs and realized that "Using Inventory Directories and Multiple Inventory Sources" is a related feature but not exactly the same thing. I removed the reference to that section from the new documentation. I also updated the pr description to better describe the issue.
This is great information - thank you @zharalim for putting it together. I think it could be made even better by making the example more detailed, to illustrate what happens when you amalgamate inventory sources in this way. Are you interested in working on this more?
Dec 6, 2018
Okay, hope it's a bit better now :)