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.
you know, I guess I could use loops:
http://docs.ansible.com/playbooks_loops.html#standard-loops
and define a map from host → IP and then have one loop do the forward DNS and another do the reverse.
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.