community.digitalocean.digital_ocean_domain_record – Manage DigitalOcean domain records¶
Note
This plugin is part of the community.digitalocean collection (version 1.1.1).
To install it use: ansible-galaxy collection install community.digitalocean
.
To use it in a playbook, specify: community.digitalocean.digital_ocean_domain_record
.
New in version 1.1.0: of community.digitalocean
Parameters¶
Notes¶
Note
Version 2 of DigitalOcean API is used.
The number of requests that can be made through the API is currently limited to 5,000 per hour per OAuth token.
Examples¶
- name: Create default A record for example.com
community.digitalocean.digital_ocean_domain_record:
oauth_token: xxxx
state: present
domain: example.com
type: A
name: "@"
data: 127.0.0.1
- name: Create A record for www
community.digitalocean.digital_ocean_domain_record:
oauth_token: xxxx
state: present
domain: example.com
type: A
name: www
data: 127.0.0.1
- name: Update A record for www based on name/type/data
community.digitalocean.digital_ocean_domain_record:
oauth_token: xxxx
state: present
domain: example.com
type: A
name: www
data: 127.0.0.2
force_update: yes
- name: Update A record for www based on record_id
community.digitalocean.digital_ocean_domain_record:
oauth_token: xxxx
state: present
domain: example.com
record_id: 123456
type: A
name: www
data: 127.0.0.2
force_update: yes
- name: Remove www record based on name/type/data
community.digitalocean.digital_ocean_domain_record:
oauth_token: xxxx
state: absent
domain: example.com
type: A
name: www
data: 127.0.0.1
- name: Remove www record based on record_id
community.digitalocean.digital_ocean_domain_record:
oauth_token: xxxx
state: absent
domain: example.com
record_id: 1234567
- name: Create MX record with priority 10 for example.com
community.digitalocean.digital_ocean_domain_record:
oauth_token: xxxx
state: present
domain: example.com
type: MX
data: mail1.example.com
priority: 10
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Adam Papai (@woohgit)