Yes you have. In option #1, when --host is call you only return that one
host and it's host variables, if any. (You said a single group.) You don't
return any groups or group variables.

The dynamic inventory plugin API is a coarse-grained one that slurps in
everything it can get from the inventory source. There are many reasons for
that such as tasks that reference other host resources not targeted by the
play.


[image: photo]
Timothy Appnel
Senior Solutions Architect

Ansible, Inc. *•* www.ansible.com

On Tue, Aug 11, 2015 at 12:21 PM, Andy Baker <andy...@gmail.com> wrote:

> This passage:
> http://docs.ansible.com/ansible/developing_inventory.html#tuning-the-external-inventory-script
>
> seems to say you have two options:
>
> 1. Return a list of groups when called with --list and then return all the
> vars for a single group when called with --host
> 2. Return all groups and all vars in one go when called with --list (the
> 'tuned' version)
>
> However in both cases you're forced to generate all groups and all vars.
>
> If I'm running a command on a single host or group - I rather expected
> there would be a way to avoid generating the vars for all the groups or
> hosts that I have no intention of connecting to.
>
> Have I misunderstood something?
>
> --
> 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-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/99d61d16-f33d-453d-a23c-4663befaa9c5%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/99d61d16-f33d-453d-a23c-4663befaa9c5%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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAOMCme6c%2BO1TXBRh%2BD1y8bXQ06S_VUEnmb-0dF_wRKru-wwCiQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to