Domain resources are domain names that you have purchased from a domain name registrar that you are managing through the DigitalOcean DNS interface.
This module establishes top-level control over each domain.
Actions that affect individual domain records should be taken on the domain_record
module.
View the API documentation at https://docs.digitalocean.com/reference/api/api-reference/#tag/Domains.
Parameter | Choices | Default | Comments |
---|---|---|---|
client_override_options (dict) |
Client override options (developer use). For example, can be used to override the DigitalOcean API endpoint for an internal test suite. If provided, these options will knock out existing options. | ||
ip_address (str) |
This optional attribute may contain an IP address. When provided, an A record will be automatically created pointing to the apex domain. | ||
module_override_options (dict) |
Module override options (developer use). Can be used to override module options to support experimental or future options. If provided, these options will knock out existing options. | ||
name (str) |
The name of the domain itself. This should follow the standard domain format of domain.TLD. For instance, example.com is a valid domain name. |
||
state (str) |
|
present | State of the resource, present to create, absent to destroy. |
timeout (int) |
300 | Polling timeout in seconds. | |
token (str) |
DigitalOcean API token. There are several environment variables which can be used to provide this value. DIGITALOCEAN_ACCESS_TOKEN , DIGITALOCEAN_TOKEN , DO_API_TOKEN , DO_API_KEY , DO_OAUTH_TOKEN and OAUTH_TOKEN |
- name: Create domain
digitalocean.cloud.domain:
token: "{{ token }}"
name: my-test-domain.com
- name: Create domain and apex record
digitalocean.cloud.domain:
token: "{{ token }}"
name: my-test-domain.com
ip_address: 192.168.100.50
Key | Returned | Description |
---|---|---|
domain (dict) |
always |
Domain.
Sample:
|
error (dict) |
failure |
DigitalOcean API error.
Sample:
|
msg (str) |
always |
Domain result information.
Sample:
|