I kind of feel like I'm giving kickstarter updates on something that
isn't done yet, but I want you to be excited
The ansible-commander data layer can now do everything I want to do
with groups and hosts, and is ready to support wiring things up to
REST now!
I'm going to be writing a very very basic and dumb test script,
probably using Requests, to exercise the wired up API, to prove we can
do the following things via JSON/REST:
* add a user
* change the user's password
* delete a user
* add a group
* change the group name, or change the group's parents
* change the group variables
* add a host
* change the groups the host is directly in
* change the host variables
* ask for ansible, what groups contain what hosts
* ask for ansible what the 'blended' variables to use for the host
are, in the inventory script
If you look at commander.py you can see the URL routes are already
layed out (but may change somewhat).
Once that is done, we write the inventory plugin, which should be
super simple, which just talks to the REST API in
unauthenticated fashion. This will allow multiple ansible servers
(should you want that) to live on different machines and all talk to
the central inventory server. This will be a really short script as
it's not doing much more than what curl would do!
Next steps? Stage2!
We are then basically fully complete for the *BACKEND* components of
what will release for Ansible-Commander 0.1, and you'll be able to go
ahead and use it however you want -- and the API won't have to evolve
much more at all for what it can do now. (I anticipate this will be a
really good way to write integrations with other inventory systems,
like if you had a proprietary CMDB and wanted to sync it with
Ansible's information.)
This is to say, the front end components then need to be written, and
we'll start on that next.
I anticipate there's less than a day's worth of work (in man-hours)
left on the backend parts before the REST API and inventory plugin
will be done.
The data layer was hideously complicated to handle the logic of things
like "what if I delete a group that has both parents and child groups,
etc" -- decisions previously humans had to handle when working with
the INI files -- but it's all out of the way now, which is good -- and
it works pretty nicely.
There is a stage 3 -- playbook logging and visualization, and so
forth, but this will probably come in later releases of
Ansible-commander.
Coming along nicely. Just wanted to give you an update, there should
be a functional REST impelementation to hammer on very soon!
--Michael