Ansible 2.0.0.2 fails on dynamic inventory

Hi,

I have a dynamic inventory source (mixed with static files for further grouping), that works with Ansible 1.9.4 but fails with Ansible 2.0
with the error:

Traceback (most recent call last):
File “/opt/ansible-python/2016-01-26/Linux-x86_64/ansible-2.0.0.2/bin/ansible-playbook”, line 85, in
sys.exit(cli.run())
File “/opt/ansible-python/2016-01-26/Linux-x86_64/ansible-2.0.0.2/lib/python2.7/site-packages/ansible/cli/playbook.py”, line 128, in run
inventory = Inventory(loader=loader, variable_manager=variable_manager, host_list=self.options.inventory)
File “/opt/ansible-python/2016-01-26/Linux-x86_64/ansible-2.0.0.2/lib/python2.7/site-packages/ansible/inventory/init.py”, line 81, in init
self.parse_inventory(host_list)
File “/opt/ansible-python/2016-01-26/Linux-x86_64/ansible-2.0.0.2/lib/python2.7/site-packages/ansible/inventory/init.py”, line 124, in parse_inventory
self.parser = InventoryDirectory(loader=self._loader, groups=self.groups, filename=host_list)
File “/opt/ansible-python/2016-01-26/Linux-x86_64/ansible-2.0.0.2/lib/python2.7/site-packages/ansible/inventory/dir.py”, line 164, in init
host.groups.remove(ungrouped)
ValueError: list.remove(x): x not in list

Is there any dynalic inventory output format documentation (I did not find it)?
Is there any change in the dynamic inventory JSON format between 1.9 and 2.0?

François.

The format has not changed, though validation is now stricter, but in
this case it looks like a bug. Please open an Issue in github and
please use the issue template to provide information enough to
reproduce this.