Good: we’ve settled on using Ansible for orchestrating our servers and software.
Problem: keeping up with inventory, and variables.
We’re a hosting company. Items I have to worry about for this include host names, customer names for websites, various settings for this, and that. User names for users to access their hosts.[1]
What are my options for Ansible extracting data from an external source for inventory?
Appreciate any replies in advance,
~brian
[1] We currently have two, canonical sources of information: Confluence and our CRM. But I can use anything if it works.
Hi Brian,
What are my options for Ansible extracting data from an external source
for inventory?
The easy answer, is 'dynamic inventory' where you can write whatever
script in whatever language you want, that returns all your data in a
specific JSON scheme:
http://docs.ansible.com/intro_dynamic_inventory.html
Of course, translating such data into the ansible model, with (parent/child
inheriting) groups and hosts, demands more thought, and also strongly
depends on the way you want to write your playbooks, possibly think of
things like dev vs testing vs production etc.
[1] We currently have two, canonical sources of information: Confluence
and our CRM. But I can use anything if it works.
If your source has some API you can query from said script, your are good
to go.
(I'm not sure how you would query structured data from Confluence
though.)
Serge