"--host" functionality for a dynamic inventory

Hello,
is it necessary to implement the --host functionality when my dynamic inventroy script returns all the hosts in _meta?

I refer to
http://docs.ansible.com/developing_inventory.html#tuning-the-external-inventory-script

I just briefly tried with Ansible 1.8 and it seems that when I have _meta populated, it does not invoke the inventory script with --host even when I target only one host.

Can I just

“raise NotImplementedError(“everything is in _meta when you --list”)”

for the --host arg?

Thanks for answering!

Best Regards,
Tomas Karasek

​no, the parsing code will not run --host when you return the _meta key for
--list
what I do as a failsafe, is just returning an empty json dict {} when
calling --host​

Thanks for prompt reply! Good idea with the empty dict.