Hi,
I'm developing a script using ansible python API 
(http://docs.ansible.com/ansible/developing_api.html)
Here  is my ansible version
```
ansible 2.2.0 (devel af150ea43a) last updated 2016/06/18 02:00:10 (GMT +800)
  lib/ansible/modules/core: (detached HEAD f0f5272f90) last updated 
2016/06/19 09:59:32 (GMT +800)
  lib/ansible/modules/extras: (detached HEAD 6cb6829384) last updated 
2016/06/19 09:59:53 (GMT +800)
  config file =
  configured module search path = Default w/o overrides

```


My inventory is dynamic, so I follow the  guide here 
: http://docs.ansible.com/ansible/developing_inventory.html

I found my script must support the `--list` option and `--host <hostname>` 
option.  
What stumbles me  is that when I use `--host <hostname>`,  the `<hostname>` 
must appear in the output of the --list option.
But I can't get all the hosts that I have access in advance.   I just 
render my options with `<hostname>` when I call the  `--host <hostname>` 
option.


Actually, all I need is to  render my  connection options based on the 
`<hostname>` option and I can't know the list of <hostname> in advance. 
How can I achieve this goal? 

Thanks in advance :)

-- 
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/5af35801-cd20-4091-bfea-e973438359ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to