community / community.general / 2.5.9 / module / netcup_dns manage Netcup DNS records Authors: Nicolai Buchwitz (@nbuchwitz)community.general.netcup_dns (2.5.9) — module
Install with ansible-galaxy collection install community.general:==2.5.9
collections: - name: community.general version: 2.5.9
Manages DNS records via the Netcup API, see the docs U(https://ccp.netcup.net/run/webservice/servers/endpoint.php)
- name: Create a record of type A community.general.netcup_dns: api_key: "..." api_password: "..." customer_id: "..." domain: "example.com" name: "mail" type: "A" value: "127.0.0.1"
- name: Delete that record community.general.netcup_dns: api_key: "..." api_password: "..." customer_id: "..." domain: "example.com" name: "mail" type: "A" value: "127.0.0.1" state: absent
- name: Create a wildcard record community.general.netcup_dns: api_key: "..." api_password: "..." customer_id: "..." domain: "example.com" name: "*" type: "A" value: "127.0.1.1"
- name: Set the MX record for example.com community.general.netcup_dns: api_key: "..." api_password: "..." customer_id: "..." domain: "example.com" type: "MX" value: "mail.example.com"
- name: Set a record and ensure that this is the only one community.general.netcup_dns: api_key: "..." api_password: "..." customer_id: "..." name: "demo" domain: "example.com" type: "AAAA" value: "::1" solo: true
solo: default: false description: - Whether the record should be the only one for that record type and record name. Only use with C(state=present) - This will delete all other records with the same record name and type. type: bool type: choices: - A - AAAA - MX - CNAME - CAA - SRV - TXT - TLSA - NS - DS description: - Record type required: true type: str state: choices: - present - absent default: present description: - Whether the record should exist or not required: false type: str value: description: - Record value required: true type: str domain: description: - Domainname the records should be added / removed required: true type: str record: aliases: - name default: '@' description: - Record to add or delete, supports wildcard (*). Default is C(@) (e.g. the zone name) type: str api_key: description: - API key for authentication, must be obtained via the netcup CCP (U(https://ccp.netcup.net)) required: true type: str priority: description: - Record priority. Required for C(type=MX) required: false type: int customer_id: description: - Netcup customer id required: true type: int api_password: description: - API password for authentication, must be obtained via the netcup CCP (https://ccp.netcup.net) required: true type: str
records: contains: id: description: internal id of the record returned: success sample: 12345 type: int name: description: the record name returned: success sample: fancy-hostname type: str priority: description: the record priority (only relevant if type=MX) returned: success sample: 0 type: int type: description: the record type returned: succcess sample: A type: str value: description: the record destination returned: success sample: 127.0.0.1 type: str description: list containing all records returned: success type: complex