ansible - sub groups in ansible hosts file or conceptual equivalent

572 views
Skip to first unread message

Cevyn E

unread,
Sep 1, 2015, 1:43:50 PM9/1/15
to Ansible Project
Searched a fair amount but seem to not quite pull it together.
I want to have something like this in my ansible hosts file

[biggroup]
subgroup1
subgroup2

[subgroup1]
1.1.1.1

[subgroup2]
2.2.2.2

I want be able to see that I'm pulling the right groups without just just putting IP addresses under [biggroup] and losing track of which host they are. 
Also I use the subgroups and think it easier to manage individuals host under them.

I'm sure there is a very simple cool way to conceptually do this I'm just missing it in the doc!

Serge van Ginderachter

unread,
Sep 1, 2015, 3:10:45 PM9/1/15
to ansible...@googlegroups.com

You can define children groups like this:

[biggroup
​:children​
]
Reply all
Reply to author
Forward
0 new messages