How to make variant DNS config on windows following hosts group

20 views
Skip to first unread message

Georges Orwell

unread,
Dec 28, 2017, 1:22:45 PM12/28/17
to Ansible Project
Hi everybody

I'm looking for a way to deploy different DNS host config  following the hosts group of Windows Servers
The main goal is to load balance in fault of true  proxy DNS.


For exemple:

[HOST GROUP1]

Winserver1
Winserver2
Winserver3


[HOST GROUP2]

Winserver4
Winserver5
Winserver6


[HOST GROUP3]

Winserver7
Winserver8
Winserver9






HOST GROUP 1 = > DNS: 192.168.10.10,192.168.10.11,192.168.10.12

HOST GROUP 2 = > DNS: 192.168.10.11,192.168.10.12,192.168.10.10

HOST GROUP 3 = > DNS: 192.168.10.12,192.168.10.10,192.168.10.11
 
Thank you for your help

Happy new year

Georges

 

Mike Klebolt

unread,
Jan 4, 2018, 3:14:01 PM1/4/18
to Ansible Project
Something like this?


group_vars
/host_group1.yml
---
DNS
:
 
- 192.168.10.10
 
- 192.168.10.11
 
- 192.168.10.12
 
 
group_vars
/host_group2.yml
---
DNS
:
 
- 192.168.10.11
 
- 192.168.10.12
 
- 192.168.10.10


 
group_vars
/host_group3.yml
---
DNS
:
 
- 192.168.10.12
 
- 192.168.10.10
 
- 192.168.10.11


Georges Orwell

unread,
Jan 9, 2018, 9:13:00 AM1/9/18
to Ansible Project
Hi mike,

Yes exactly like this.

Same question for 400 Linux servers.
I wan't to have 4 groups with each group have différent DNS config.
Is there way to do this only using ansible yml and no scripting bash ?

Thanks
Reply all
Reply to author
Forward
0 new messages