community.general.gandi_livedns module – Manage Gandi LiveDNS records
Note
This module is part of the community.general collection (version 8.6.7).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.gandi_livedns
.
New in community.general 2.3.0
Synopsis
Manages DNS records by the Gandi LiveDNS API, see the docs: https://doc.livedns.gandi.net/.
Aliases: net_tools.gandi_livedns
Parameters
Parameter |
Comments |
---|---|
Account API token. |
|
The name of the Domain to work with (for example, “example.com”). |
|
Record to add. |
|
Whether the record(s) should exist or not. Choices:
|
|
The TTL to give the new record. Required when |
|
The type of DNS record to create. |
|
The record values. Required when |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Examples
- name: Create a test A record to point to 127.0.0.1 in the my.com domain
community.general.gandi_livedns:
domain: my.com
record: test
type: A
values:
- 127.0.0.1
ttl: 7200
api_key: dummyapitoken
register: record
- name: Create a mail CNAME record to www.my.com domain
community.general.gandi_livedns:
domain: my.com
type: CNAME
record: mail
values:
- www
ttl: 7200
api_key: dummyapitoken
state: present
- name: Change its TTL
community.general.gandi_livedns:
domain: my.com
type: CNAME
record: mail
values:
- www
ttl: 10800
api_key: dummyapitoken
state: present
- name: Delete the record
community.general.gandi_livedns:
domain: my.com
type: CNAME
record: mail
api_key: dummyapitoken
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
A dictionary containing the record data. Returned: success, except on record deletion |
|
The domain associated with the record. Returned: success Sample: |
|
The record name. Returned: success Sample: |
|
The time-to-live for the record. Returned: success Sample: |
|
The record type. Returned: success Sample: |
|
The record content (details depend on record type). Returned: success Sample: |