# Ansible 2.0.0.2 fails on dynamic inventory

**URL:** <https://forum.ansible.com/t/ansible-2-0-0-2-fails-on-dynamic-inventory/20385>\
**Category:** Ansible Project\
**Created:** [January 29, 2016, 1:37pm UTC](https://forum.ansible.com/t/ansible-2-0-0-2-fails-on-dynamic-inventory/20385 "2016-01-29T13:37:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Francois\_Barriere](https://avatars.discourse-cdn.com/v4/letter/f/9dc877/32.png) [@Francois\_Barriere](https://forum.ansible.com/u/Francois_Barriere)\
**Post date:** [January 29, 2016, 1:37pm UTC](https://forum.ansible.com/t/ansible-2-0-0-2-fails-on-dynamic-inventory/20385/1 "2016-01-29T13:37:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [January 29, 2016, 2:21pm UTC](https://forum.ansible.com/t/ansible-2-0-0-2-fails-on-dynamic-inventory/20385/2 "2016-01-29T14:21:50Z")

</div>

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.
