# inventory issue

**URL:** <https://forum.ansible.com/t/inventory-issue/25489>\
**Category:** Ansible Project\
**Created:** [September 14, 2017, 9:06pm UTC](https://forum.ansible.com/t/inventory-issue/25489 "2017-09-14T21:06:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric\_S1](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@Eric\_S1](https://forum.ansible.com/u/Eric_S1)\
**Post date:** [September 14, 2017, 9:06pm UTC](https://forum.ansible.com/t/inventory-issue/25489/1 "2017-09-14T21:06:00Z")

</div>

I’m getting the following error:  
ERROR! invalid host \<host\_name\> specified for playbook iteration

I have a role that is set to only run against X group of servers that are in an inventory list. The server that is getting the invalid host is not in that sever group so I don’t know why ansible is even trying that host as it is listed in another server group but not the one the role is being applied to.

I’ve never seen this in my 4 years of using ansible. Please help.

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [September 14, 2017, 9:51pm UTC](https://forum.ansible.com/t/inventory-issue/25489/2 "2017-09-14T21:51:01Z")

</div>

It looks like that was fixed some time ago in [https://github.com/ansible/ansible/commit/fa368934bd26600104f72f9d8f0591c0fd68e958](https://github.com/ansible/ansible/commit/fa368934bd26600104f72f9d8f0591c0fd68e958)

Based on a comment in an issue, it’s been fixed since 2.1.1.
