I’m new to Ansible and loving it so far. But I’m new so maybe I’m missing something obvious when I can’t figure out how to make the digital_ocean_domain module create DNS records instead of just zone files.
The example here, http://docs.ansible.com/digital_ocean_domain_module.html, creates a DigitalOcean droplet (virtual machine), and then creates a DigitalOcean domain record (DNS zone file) with the IP of the newly created droplet.
What I would really like is to be able to create a DNS A record inside a zone file.
Sorry for the delay, I didn’t see your response until this morning.
I have my script below which is taken almost verbatim from http://docs.ansible.com/digital_ocean_domain_module.html. The first call to digital_ocean_domain creates a zone file for “example-1.com” with NS records and a default A record “@”. Then it creates a droplet, then it calls digital_ocean_domain again to, hopefully, create a A record for the droplet that was just created and in the existing zone file. What it actually does is create another zone file for “hs2.example-1.com” with NS records and a default A record “@”. So if I create 10 droplets under a domain I would end up with 10 zone files instead of one zone file containing 10 A records as I would expect.
Maybe this was intentional, and I suspect it would work, but it’s not the way I would ever setup DNS. So if it is intentional there should be a big warning in the docs to say so.