How to references a list of host in play book?

10 views
Skip to first unread message

Sicheng Tang

unread,
May 23, 2016, 9:05:34 AM5/23/16
to Ansible Project
Suppose I have a group of host, whose Ip are 10.129.51.158,10.129.50.235,10.129.50.234,  and I define it as a variable
ip = 10.129.51.158,10.129.50.235,10.129.50.234

Is there any to to generate a play book like this by referencing this variable ?

[my-role]
10.129.51.158
10.129.50.235
10.129.50.234
[my-role:var]
db_user = tang
Reply all
Reply to author
Forward
0 new messages