Unique Host Entries In Inventory File?

23 views
Skip to first unread message

Tiglath

unread,
Sep 15, 2014, 12:06:37 PM9/15/14
to ansible...@googlegroups.com
 
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.   

Serge van Ginderachter

unread,
Sep 15, 2014, 1:07:36 PM9/15/14
to ansible...@googlegroups.com

On 15 September 2014 18:06, Tiglath <te...@tiglath.net> wrote:
I read in another thread that hosts must appear only once in the inventory file.  


​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)
Reply all
Reply to author
Forward
0 new messages