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. Thanks for reading :) --- - hosts: 127.0.0.1 tasks: - name: "Ensure that the SSH key exists for the account" digital_ocean_sshkey: state=present name=jeff ssh_pub_key='*************HIDDEN*************' register: my_ssh_key - digital_ocean_domain: > state=present name=example-1.com ip=127.0.0.1 - digital_ocean: > state=present name=hs2 size_id=66 region_id=4 image_id=5141286 register: hs2 - digital_ocean_domain: > state=present name={{ hs2.droplet.name }}.example-1.com ip={{ hs2.droplet.ip_address }} -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e2cccea4-b0f4-459f-9769-ed848eca9c80%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.