In general neither dynamic inventory scripts nor modules have access to
host/group vars.

host/group vars are part of inventory, so for me it feels weird that an
inventory script would need access to them, as opposed to providing them.

As far as modules, you should require that the var be passed to the
module.  The only way to get this by default is to also write an action
plugin that could pass the var to the module for you.

On Thursday, May 5, 2016, Donald Clark Jackson <[email protected]> wrote:

>
> Hello,
>
> I'm developing both an Ansible module and a dynamic inventory script, in
> Python.
>
> In each case, I need to lookup/obtain the value of a host/group variable.
>
> I've looked through the documentation, and tried a bunch of online
> searches, but haven't really found anything very illuminating.
>
> Any advice/pointers would be greatly appreciated.
>
> Don
>
> --
> 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 [email protected] <javascript:;>.
> To post to this group, send email to [email protected]
> <javascript:;>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/8C6DC569-7B75-4E84-B84C-2A9F06C1003B%40drivescale.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 Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAD8N0v-wMQ-5-EM%2BxJN3A%3DCC6rko85Sdi9irsrVrL-XOQVktNA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to