Best way to manage DNS via ansible.

228 views
Skip to first unread message

Kevin Burton

unread,
Dec 14, 2014, 2:13:23 AM12/14/14
to ansible...@googlegroups.com
Since we have all of our cluster in Ansible I want to also manage our DNS this way too.

What I was thinking of is having a playbook that runs before all of our other playbooks.

One issue though is that I'd like a module that does forward and reverse DNS with one pass.

I haven't found any that can do it... the dnsimple module looks nice but it can't do forward and reverse DNS.


Kevin Burton

unread,
Dec 14, 2014, 2:14:43 AM12/14/14
to ansible...@googlegroups.com
you know, I guess I could use loops:


and define a map from host -> IP and then have one loop do the forward DNS and another do the reverse.  

Michael DeHaan

unread,
Dec 15, 2014, 6:57:29 AM12/15/14
to ansible...@googlegroups.com
Cobbler templated BIND and dnsmasq back in the day without too much difficulty - you could do this with host variables and a single template call, where each host has both a variable for it's IP (or just uses the fact) and has another variable "hostname".

Shouldn't need to loop much in the playbook itself at all, just the template.

dnsmasq is obviously easier to configure if it's sufficient.



--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ece8e64a-eb04-4e7d-b212-c95761b2f26f%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages