Is it possible to generate Inventory from CMDB (Configuration Management Database)

689 views
Skip to first unread message

Raghava Krishna

unread,
Jun 13, 2016, 10:36:16 AM6/13/16
to Ansible Project

I'am planning to generate dynamic inventory file from configuration management database system instead of writing in files. Is it possible to write a script,so that when i run ansible playbook it should pick up inventory from database.
If it is successful then i have a plan of generating the variables from database itself.

Greg DeKoenigsberg

unread,
Jun 13, 2016, 10:41:28 AM6/13/16
to Ansible Project
On Mon, Jun 13, 2016 at 10:31 AM, Raghava Krishna <raghavakris...@gmail.com> wrote:

I'am planning to generate dynamic inventory file from configuration management database system instead of writing in files. Is it possible to write a script,so that when i run ansible playbook it should pick up inventory from database.
If it is successful then i have a plan of generating the variables from database itself.


Yes. Just make a script that queries your CMDB and returns output in JSON format, and that's your dynamic inventory script.

 
--
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/bf3eed65-adf3-47ab-a5dc-8a348ddd8e12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Greg DeKoenigsberg
Ansible Community Guy
Reply all
Reply to author
Forward
0 new messages