Dealing with Inventory File Proliferation

28 views
Skip to first unread message

David Lane

unread,
Mar 9, 2017, 3:01:10 AM3/9/17
to Ansible Project
Hi,

I've inherited a complex deployment system which is steadily getting more complex. This is fine, except we also have multiple instances of this system (several variants of Production and Dev plus many, many developer instances).

Currently all of our inventory files are long, very similar files with one or two things tweaked appropriately. This makes maintenance a nightmare where for every time I need to modify a feature, add a variable or remove something I have to manually edit upwards of ten non-trivial inventories.

Has anyone been in this sort of situation before?

Sorry for the lack of detail, I'm at the state where I've wondered around poking various ideas for long enough that I haven't really got a clear direction and my brain's gone fuzzy.

Cheers,

David

Spike

unread,
Mar 9, 2017, 11:54:24 AM3/9/17
to Ansible Project
I'm facing a similar problem and the way I'm looking at solving it is dynamic inventories. I've also considered using multiple inventories + symlinks (nto sure that works tho). See: http://docs.ansible.com/ansible/intro_dynamic_inventory.html#using-inventory-directories-and-multiple-inventory-sources

I have all my hosts in an external data source, tagged, so I could easily have multiple tags to include hosts in different inventories and then generate them at runtime. This way management is as simple as adding an entry to the hosts table and one or more tags in the tags column.

hope that helps,

Spike

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ff9183b3-f019-4c3e-98b0-e3231cf88ad6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

je...@soundhound.com

unread,
Mar 10, 2017, 8:38:42 AM3/10/17
to Ansible Project
Could you move the common things to vars within the group so that all the host has for vars is the things that change?
jerry
Reply all
Reply to author
Forward
0 new messages