--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
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.
On May 5, 2016, at 4:37 PM, Matt Martz <ma...@sivel.net> wrote: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.
template_string = '' % fact_name
res = template.template(self.basedir, template_string, inject)
return None if res == template_string else res
On Thursday, May 5, 2016, Donald Clark Jackson <d...@drivescale.com> 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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
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.
----
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
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.