# Unique Host Entries In Inventory File?

**URL:** <https://forum.ansible.com/t/unique-host-entries-in-inventory-file/16229>\
**Category:** Ansible Project\
**Created:** [September 15, 2014, 4:06pm UTC](https://forum.ansible.com/t/unique-host-entries-in-inventory-file/16229 "2014-09-15T16:06:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tiglath](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@Tiglath](https://forum.ansible.com/u/Tiglath)\
**Post date:** [September 15, 2014, 4:06pm UTC](https://forum.ansible.com/t/unique-host-entries-in-inventory-file/16229/1 "2014-09-15T16:06:37Z")

</div>

I read in another thread that hosts must appear only once in the inventory file.

That’s a problem, but it doesn’t seem to matter much, everything runs fine, so I wonder…

My inventory file groups hosts into, qa\_servers, prod\_servers, and then install\_servers, patch\_servers, etc. So that group membership indicates both which environment a server can take, and which kind of deployment (patch or fresh install) can and cannot do.

I cannot model it this way without repeat hosts entries.

---

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [September 15, 2014, 5:07pm UTC](https://forum.ansible.com/t/unique-host-entries-in-inventory-file/16229/2 "2014-09-15T17:07:11Z")

</div>

​That must be a mistake or misunderstood. Hosts can be in multiple groups,  
so they need to be repeated in the ini file(s).  
There is no harm in mentioning hosts multiple times (except before 1.7 some  
corner cases could apply, but few people would notice)
