How to deal with "inventory" that isn't inventoriable.

85 views
Skip to first unread message

Stephen John Smoogen

unread,
Nov 22, 2016, 7:06:21 PM11/22/16
to ansible...@googlegroups.com
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?


--
Stephen J Smoogen.

Spike

unread,
Nov 22, 2016, 8:12:52 PM11/22/16
to ansible...@googlegroups.com
Stephen,

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.

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/CANnLRdicAW_SCZE3OkrKMPqr3F8NXj-Sxc9h5Ne2y%3Dw9mWQDmQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Stephen John Smoogen

unread,
Nov 23, 2016, 10:20:11 AM11/23/16
to ansible...@googlegroups.com
On 22 November 2016 at 20:12, Spike <sp...@drba.org> wrote:
> Stephen,
>
> 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:
>
> http://ralph.allegro.tech/

Oooooh I had not seen this and will definitely look at that.
> https://groups.google.com/d/msgid/ansible-project/CAPE6YbQUvpMPVPyQed2i%2BUUW1PdYWDeW%3D9DmGQ0Mwa%2Bs4iqAiA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



--
Stephen J Smoogen.

Mark Janssen

unread,
Dec 23, 2016, 8:57:59 AM12/23/16
to ansible...@googlegroups.com
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

>> email to ansible-project+unsubscribe@googlegroups.com.
>> To post to this group, send email to ansible-project@googlegroups.com.

>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/CANnLRdicAW_SCZE3OkrKMPqr3F8NXj-Sxc9h5Ne2y%3Dw9mWQDmQ%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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-project+unsubscribe@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
--
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-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CANnLRdgTjo-Jq0PAoN0_e60iCsr7HifnrXyJXqmvWeiPpBZt5w%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--
Mark Janssen  --  maniac(at)maniac.nl
Unix / Linux Open-Source and Internet Consultant
Maniac.nl Sig-IO.nl Vps.Stoned-IT.com

Reply all
Reply to author
Forward
0 new messages