# How to make variant DNS config on windows following hosts group

**URL:** <https://forum.ansible.com/t/how-to-make-variant-dns-config-on-windows-following-hosts-group/26390>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [December 28, 2017, 6:22pm UTC](https://forum.ansible.com/t/how-to-make-variant-dns-config-on-windows-following-hosts-group/26390 "2017-12-28T18:22:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Georges\_Orwell](https://avatars.discourse-cdn.com/v4/letter/g/ea666f/32.png) [@Georges\_Orwell](https://forum.ansible.com/u/Georges_Orwell)\
**Post date:** [December 28, 2017, 6:22pm UTC](https://forum.ansible.com/t/how-to-make-variant-dns-config-on-windows-following-hosts-group/26390/1 "2017-12-28T18:22:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mike\_Klebolt](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@Mike\_Klebolt](https://forum.ansible.com/u/Mike_Klebolt)\
**Post date:** [January 4, 2018, 8:14pm UTC](https://forum.ansible.com/t/how-to-make-variant-dns-config-on-windows-following-hosts-group/26390/2 "2018-01-04T20:14:01Z")

</div>

`  
Something like this?

group\_vars/host\_group1.yml

---

<div class="post-metadata">

**Author:** ![Georges\_Orwell](https://avatars.discourse-cdn.com/v4/letter/g/ea666f/32.png) [@Georges\_Orwell](https://forum.ansible.com/u/Georges_Orwell)\
**Post date:** [January 9, 2018, 2:13pm UTC](https://forum.ansible.com/t/how-to-make-variant-dns-config-on-windows-following-hosts-group/26390/3 "2018-01-09T14:13:00Z")

</div>

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
