Would the custom module be apart of the same playbook that the host
variable is in? Or separate?

If it apart of the same playbook My first thought is to pass the j2 host
variable nto the custom python module as a parameter, if it is an Ansible
module that is. Otherwise you should be able to pass it into the module as
a sys.argv as well and let the custom module perform its logic from there.



On Tue, Sep 10, 2019 at 01:06 thameem ansari <ksthamee...@gmail.com> wrote:

> How can i get hosts variable value from ansible yaml file for a particular
> playbook to custom python module?
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-devel/1900adfe-e90d-4ddf-8755-41981a8a51dc%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-devel/1900adfe-e90d-4ddf-8755-41981a8a51dc%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/CA%2Bs1_jTEW-U43GVJtFOf%2BeOMjFJRZ8szrT%3DmpMEeBUTbvvhoCQ%40mail.gmail.com.

Reply via email to