community / community.general / 6.6.8 / module / gandi_livedns Manage Gandi LiveDNS records | "added in version" 2.3.0 of community.general" Authors: Gregory Thiemonge (@gthiemonge)community.general.gandi_livedns (6.6.8) — module
Install with ansible-galaxy collection install community.general:==6.6.8
collections: - name: community.general version: 6.6.8
Manages DNS records by the Gandi LiveDNS API, see the docs: U(https://doc.livedns.gandi.net/).
- 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
ttl: description: - The TTL to give the new record. - Required when I(state=present). type: int type: description: - The type of DNS record to create. required: true type: str state: choices: - absent - present default: present description: - Whether the record(s) should exist or not. type: str domain: description: - The name of the Domain to work with (for example, "example.com"). required: true type: str record: description: - Record to add. required: true type: str values: description: - The record values. - Required when I(state=present). elements: str type: list api_key: description: - Account API token. required: true type: str
record: contains: domain: description: The domain associated with the record. returned: success sample: my.com type: str record: description: The record name. returned: success sample: www type: str ttl: description: The time-to-live for the record. returned: success sample: 300 type: int type: description: The record type. returned: success sample: A type: str values: description: The record content (details depend on record type). elements: str returned: success sample: - 192.0.2.91 - 192.0.2.92 type: list description: A dictionary containing the record data. returned: success, except on record deletion type: dict