There is an open PR to provide a little more documentation for users
converting an inventory script to an inventory plugin:

https://github.com/ansible/ansible/pull/44727

That might be of use (Note: I haven't yet read through the changes)

On Mon, Aug 27, 2018 at 4:34 PM Luke Murphy <luk...@riseup.net> wrote:

> Hi folks,
>
> Following #44721[1], I've been investigating how to write a Linode
> inventory plugin. Along with the questions in that ticket (happy if
> anyone can help answer!) I have some more general questions:
>
> * What is the return value of inventory plugins? They all seem to be
> different.
>   Is there some standard format? For example, a JSON response format.
>
> * Is there are best practice for writing these plugins? Looking at the
>   plugin list[1], they all seem to take different approaches with
>   filters, groups and querying parameters.
>
> My assumption is that I should try to mimic what the cloud provider
> exposes. So, in the case of Linode, as the existing Linode inventory
> script does, we expose linode IDs, datacenter IDs and group names, etc.
> This some how feels quite ad-hoc and perhaps confusing to users who will
> use inventory plugins ('what do I actually get from this plugin to
> target!?').
>
> Here's all the documentation I can find right now:
>
> > https://docs.ansible.com/ansible/latest/plugins/inventory.html
>
> I'd like to improve this, if possible, with the following discussion.
>
> Thanks,
>
> Luke
>
> [1]: https://github.com/ansible/ansible/issues/44721
> [2]:
> https://docs.ansible.com/ansible/latest/plugins/inventory.html#plugin-list
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-devel+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Matt Martz
@sivel
sivel.net

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to