Some useful info if you haven't read both of them already:

Dynamic inventory:  http://docs.ansible.com/intro_dynamic_inventory.html
Developing dynamic inventory:
http://docs.ansible.com/developing_inventory.html

Basically these are only useful when used as inventory, the 'setup' module
in Ansible provides variables about the host after talking to them, the
inventroy script provides data *before* talking to them.   If you're asking
how to use that script, you chmod +x it and use it as the name of your
inventory file.

If you're asking how to use variables from that script, variables from
anywhere in ansible can be used as arguments to modules like {{
variable_name }}, so those work just like facts from the setup module.

Let us know more specifics about what you're looking to do and we can
perhaps provide other pointers.

Thanks!

On Sun, Sep 14, 2014 at 10:40 AM, <[email protected]> wrote:

> Hello,
>
> My problem is simple. I created a script that return a json with server
> network informations when run: script.py --host <hostname>.
> How can I use this facts ? I test with setup module but it seems to need a
> script that return in first time all servers with script.py --list and next
> run script.py --host <hostname>.
> Any idea ?
>
> --
> 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/c9f137fa-37d8-4bc4-ac5f-a0213063e358%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/c9f137fa-37d8-4bc4-ac5f-a0213063e358%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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 [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/CA%2BnsWgxaTNNs1thyuEWteksjWZZcqEKDLhjVYKqt2VRT5ukOvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to