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

**URL:** <https://forum.ansible.com/t/how-to-deal-with-inventory-that-isnt-inventoriable/23080>\
**Category:** Ansible Project\
**Created:** [November 23, 2016, 12:06am UTC](https://forum.ansible.com/t/how-to-deal-with-inventory-that-isnt-inventoriable/23080 "2016-11-23T00:06:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephen\_John\_Smoogen](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@Stephen\_John\_Smoogen](https://forum.ansible.com/u/Stephen_John_Smoogen)\
**Post date:** [November 23, 2016, 12:06am UTC](https://forum.ansible.com/t/how-to-deal-with-inventory-that-isnt-inventoriable/23080/1 "2016-11-23T00:06:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Spike1](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@Spike1](https://forum.ansible.com/u/Spike1)\
**Post date:** [November 23, 2016, 1:12am UTC](https://forum.ansible.com/t/how-to-deal-with-inventory-that-isnt-inventoriable/23080/2 "2016-11-23T01:12:36Z")

</div>

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:

[http://ralph.allegro.tech/](http://ralph.allegro.tech/)

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

---

<div class="post-metadata">

**Author:** ![Stephen\_John\_Smoogen](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@Stephen\_John\_Smoogen](https://forum.ansible.com/u/Stephen_John_Smoogen)\
**Post date:** [November 23, 2016, 3:20pm UTC](https://forum.ansible.com/t/how-to-deal-with-inventory-that-isnt-inventoriable/23080/3 "2016-11-23T15:20:05Z")

</div>

> 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/](http://ralph.allegro.tech/)

Oooooh I had not seen this and will definitely look at that.

---

<div class="post-metadata">

**Author:** ![Mark\_Janssen](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@Mark\_Janssen](https://forum.ansible.com/u/Mark_Janssen)\
**Post date:** [December 23, 2016, 1:57pm UTC](https://forum.ansible.com/t/how-to-deal-with-inventory-that-isnt-inventoriable/23080/4 "2016-12-23T13:57:48Z")

</div>

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
