# registeration of DNS records in Active Directory DNS

**URL:** <https://forum.ansible.com/t/registeration-of-dns-records-in-active-directory-dns/18022>\
**Category:** Ansible Project\
**Created:** [April 20, 2015, 2:52pm UTC](https://forum.ansible.com/t/registeration-of-dns-records-in-active-directory-dns/18022 "2015-04-20T14:52:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Test](https://avatars.discourse-cdn.com/v4/letter/j/ce73a5/32.png) [@John\_Test](https://forum.ansible.com/u/John_Test)\
**Post date:** [April 20, 2015, 2:52pm UTC](https://forum.ansible.com/t/registeration-of-dns-records-in-active-directory-dns/18022/1 "2015-04-20T14:52:27Z")

</div>

Hello,  
I was wondering if there is an existing Ansible module to register records in Active Directory DNS.  
My workflow attempt is to create Openstack instances and register their DNS records in AD.

Thank you

---

<div class="post-metadata">

**Author:** ![Chris\_Church1](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@Chris\_Church1](https://forum.ansible.com/u/Chris_Church1)\
**Post date:** [April 20, 2015, 8:41pm UTC](https://forum.ansible.com/t/registeration-of-dns-records-in-active-directory-dns/18022/2 "2015-04-20T20:41:31Z")

</div>

>

---

<div class="post-metadata">

**Author:** ![John\_Test](https://avatars.discourse-cdn.com/v4/letter/j/ce73a5/32.png) [@John\_Test](https://forum.ansible.com/u/John_Test)\
**Post date:** [April 21, 2015, 12:11am UTC](https://forum.ansible.com/t/registeration-of-dns-records-in-active-directory-dns/18022/3 "2015-04-21T00:11:30Z")

</div>

Are your OpenStack instances running Windows or Linux?  
Mostly Linux

And are you using Ansible for any configuration of your AD server?  
No

So basically my option for automating this is to call a powershell script via the Ansible playbook that creates the instance ?  
Would this be doable? Or am I looking at calling the DNS record creating powershell script from another python script.

The primary place these scripts are run is my Linux workstation (which is also Ansible Control).

Thanks

---

<div class="post-metadata">

**Author:** ![Richard\_James\_Salts](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@Richard\_James\_Salts](https://forum.ansible.com/u/Richard_James_Salts)\
**Post date:** [April 21, 2015, 12:37am UTC](https://forum.ansible.com/t/registeration-of-dns-records-in-active-directory-dns/18022/4 "2015-04-21T00:37:14Z")

</div>

> Are your OpenStack instances running Windows or Linux?  
> Mostly Linux
> 
> And are you using Ansible for any configuration of your AD server?  
> No
> 
> So basically my option for automating this is to call a powershell script  
> via the Ansible playbook that creates the instance ?  
> Would this be doable? Or am I looking at calling the DNS record creating  
> powershell script from another python script.
> 
> The primary place these scripts are run is my Linux workstation (which is  
> also Ansible Control).

[https://github.com/jpmens/ansible-m-dnsupdate](https://github.com/jpmens/ansible-m-dnsupdate) could do the dynamic update if  
you're able to do TSIG updates with MS DNS ( I know it does TSIG-GSS).

---

<div class="post-metadata">

**Author:** ![John\_Test](https://avatars.discourse-cdn.com/v4/letter/j/ce73a5/32.png) [@John\_Test](https://forum.ansible.com/u/John_Test)\
**Post date:** [April 21, 2015, 4:45pm UTC](https://forum.ansible.com/t/registeration-of-dns-records-in-active-directory-dns/18022/5 "2015-04-21T16:45:25Z")

</div>

Thank you Richard. I am going to try ansible-m-dnsupdate module.  
Sorry for noob question but how do I install this type of custom Ansible module to be used in a playbook?

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [April 21, 2015, 4:46pm UTC](https://forum.ansible.com/t/registeration-of-dns-records-in-active-directory-dns/18022/6 "2015-04-21T16:46:22Z")

</div>

create a directory named 'library' adjacent to the playbook, drop  
module file in there.

---

<div class="post-metadata">

**Author:** ![John\_Test](https://avatars.discourse-cdn.com/v4/letter/j/ce73a5/32.png) [@John\_Test](https://forum.ansible.com/u/John_Test)\
**Post date:** [April 21, 2015, 5:01pm UTC](https://forum.ansible.com/t/registeration-of-dns-records-in-active-directory-dns/18022/7 "2015-04-21T17:01:41Z")

</div>

Thanks Brian.

demo@jumpbox1:~$ ls  
add-dns-record.yml library/

demo@jumpbox1:~$ ls library/ansible-m-dnsupdate/  
dnsupdate README.md

add-dns-record.yml - my playbook

Will I have any issues regarding permissions or ownership (root etc.) ?  
Can I make this part of standard Ansible modules so anyone can use it?
