community.general.gandi_livedns – Manage Gandi LiveDNS records
Note
This plugin is part of the community.general collection (version 3.8.1).
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 version 2.3.0: of community.general
Synopsis
- Manages DNS records by the Gandi LiveDNS API, see the docs: https://doc.livedns.gandi.net/.
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
api_key string / required | Account API token. | |
domain string / required | The name of the Domain to work with (for example, "example.com"). | |
record string / required | Record to add. | |
state string |
| Whether the record(s) should exist or not. |
ttl integer | The TTL to give the new record. Required when state=present. | |
type string / required | The type of DNS record to create. | |
values list / elements=string | The record values. Required when state=present. |
Notes
Note
- Supports
check_mode
.
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 | Returned | Description | |
---|---|---|---|
record dictionary | success, except on record deletion | A dictionary containing the record data. | |
domain string | success | The domain associated with the record. Sample: my.com | |
record string | success | The record name. Sample: www | |
ttl integer | success | The time-to-live for the record. Sample: 300 | |
type string | success | The record type. Sample: A | |
values list / elements=string | success | The record content (details depend on record type). Sample: ['192.0.2.91', '192.0.2.92'] |
Authors
- Gregory Thiemonge (@gthiemonge)
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/general/gandi_livedns_module.html