I have a large number of out of band hardware (IBM IMM, routers owned
by other groups, Dracs (which will be ansibled soon), and similar odd
things) which I need to keep track of for various other software like
nagios and maybe DNS configs. Since I keep all the other hosts in the
ansible inventory files I thought that I could use that, but I
realized that this causes problems when master playbooks and such are
run which cause items in the inventory to be 'hit'. I wondered if
there was some sort of ansible_connect=none flag but realized that is
probably not what the inventory file is meant for (even if it would
have been convenient to me).
The other is to create a variable which lists all of these hosts and
then just update that when needed versus 3-4 other places. However I
wanted to see if people had a method that I was missing after going
through the first 2 pages of google search. How do people keep track
of hardware that they may need for configurations that may not be
ansibled itself?
if I understood your question/situation, I’ve dealt with the same issue in the past and my conclusion is that ansible’s inventory (or in general the inventory of any automation system) isn’t the right solution.
What you’re looking for is a CMDB or in other words an inventory/asset system where you can just record what you have and some basic properties for each asset. From there you can generate your ansible’s inventory and it also becomes the place from where ansible can get host’s data to generate configuration files like dns, nagios’s etc (which is what we do).
I’m actually in the process of setting that up for the new place where I’m at. One choice you could look at is ralph, also written in python and with apis to integrate into ansible:
other people may have better recommendations, for me the priority was to find something better than a csv file, but not as complex as some of the stuff people use in enterprise scenarios.
if I understood your question/situation, I've dealt with the same issue in
the past and my conclusion is that ansible's inventory (or in general the
inventory of any automation system) isn't the right solution.
What you're looking for is a CMDB or in other words an inventory/asset
system where you can just record what you have and some basic properties for
yes that is exactly what I was looking for. I just didn't want to use
the dreaded CMDB word :). [Because next I will mention ITIL or DRY and
people will start suffering PTSD.]
each asset. From there you can generate your ansible's inventory and it also
becomes the place from where ansible can get host's data to generate
configuration files like dns, nagios's etc (which is what we do).
I'm actually in the process of setting that up for the new place where I'm
at. One choice you could look at is ralph, also written in python and with
apis to integrate into ansible:
Maybe a simple(r) alternative is using multiple inventories… Like using a seperate inventory for these various weird devices that wouldn’t normally be used in normal ansible-runs.
You can specify alternate inventories using -i on both ansible and ansible-playbook