ansible / ansible.builtin / v2.5.12 / module / digital_ocean_domain Create/delete a DNS record in DigitalOcean | "added in version" 1.6 of ansible.builtin" Authors: Michael Gregson (@mgregson) stableinterface | supported by communityansible.builtin.digital_ocean_domain (v2.5.12) — module
pip
Install with pip install ansible==2.5.12
Create/delete a DNS record in DigitalOcean.
# Create a domain record - digital_ocean_domain: state: present name: my.digitalocean.domain ip: 127.0.0.1
# Create a droplet and a corresponding domain record - digital_ocean: state: present name: test_droplet size_id: 1gb region_id: sgp1 image_id: ubuntu-14-04-x64 register: test_droplet
- digital_ocean_domain: state: present name: "{{ test_droplet.droplet.name }}.my.domain" ip: "{{ test_droplet.droplet.ip_address }}"
id: aliases: - droplet_id description: - Numeric, the droplet id you want to operate on. ip: description: - The IP address to point a domain at. name: description: - String, this is the name of the droplet - must be formatted by hostname rules, or the name of a SSH key, or the name of a domain. state: choices: - present - absent default: present description: - Indicate desired state of the target. oauth_token: aliases: - API_TOKEN description: - DigitalOcean api token. version_added: 1.9.5 version_added_collection: ansible.builtin