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.
|
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.