Manage Linode Domains.
Field | Type | Required | Description |
---|---|---|---|
api_token |
str |
Required | The Linode account personal access token. It is necessary to run the module. It can be exposed by the environment variable LINODE_API_TOKEN instead. See details in Usage. |
- name: Create a domain
linode.cloud.domain:
domain: my-domain.com
type: master
state: present
- name: Delete a domain
linode.cloud.domain:
domain: my-domain.com
state: absent
Field | Type | Required | Description |
---|---|---|---|
domain |
str |
Required | The domain this Domain represents. |
state |
str |
Required | The desired state of the target. (Choices: present , absent ) |
axfr_ips |
list |
Optional | The list of IPs that may perform a zone transfer for this Domain. (Updatable) |
description |
str |
Optional | The list of IPs that may perform a zone transfer for this Domain. (Updatable) |
expire_sec |
int |
Optional | The amount of time in seconds that may pass before this Domain is no longer authoritative. (Updatable) |
master_ips |
list |
Optional | The IP addresses representing the master DNS for this Domain. (Updatable) |
refresh_sec |
int |
Optional | The amount of time in seconds before this Domain should be refreshed. (Updatable) |
retry_sec |
int |
Optional | The interval, in seconds, at which a failed refresh should be retried. (Updatable) |
soa_email |
str |
Optional | The Start of Authority email address. (Updatable) |
status |
str |
Optional | Used to control whether this Domain is currently being rendered. (Updatable) |
tags |
list |
Optional | An array of tags applied to this object. (Updatable) |
ttl_sec |
int |
Optional | The amount of time in seconds that this Domain’s records may be cached by resolvers or other domain servers. (Updatable) |
type |
str |
Optional | Whether this Domain represents the authoritative source of information for the domain it describes (master), or whether it is a read-only copy of a master (slave). (Updatable) |
-
domain
- The domain in JSON serialized form.- Sample Response:
{ "axfr_ips": [], "description": null, "domain": "example.org", "expire_sec": 300, "group": null, "id": 1234, "master_ips": [], "refresh_sec": 300, "retry_sec": 300, "soa_email": "[email protected]", "status": "active", "tags": [ "example tag", "another example" ], "ttl_sec": 300, "type": "master" }
- See the Linode API response documentation for a list of returned fields
- Sample Response:
-
records
- The domain record in JSON serialized form.- Sample Response:
[ { "created": "2018-01-01T00:01:01", "id": 123456, "name": "test", "port": 80, "priority": 50, "protocol": null, "service": null, "tag": null, "target": "192.0.2.0", "ttl_sec": 604800, "type": "A", "updated": "2018-01-01T00:01:01", "weight": 50 } ]
- See the Linode API response documentation for a list of returned fields
- Sample Response:
-
zone_file
- The zone file for the last rendered zone for the specified domain.- Sample Response:
{ "zone_file": [ "; example.com [123]", "$TTL 864000", "@ IN SOA ns1.linode.com. user.example.com. 2021000066 14400 14400 1209600 86400", "@ NS ns1.linode.com.", "@ NS ns2.linode.com.", "@ NS ns3.linode.com.", "@ NS ns4.linode.com.", "@ NS ns5.linode.com." ] }
- See the Linode API response documentation for a list of returned fields
- Sample Response: