ansible / ansible.builtin / v2.9.27 / module / netcup_dns manage Netcup DNS records | "added in version" 2.7.0 of ansible.builtin" Authors: Nicolai Buchwitz (@nbuchwitz) preview | supported by communityansible.builtin.netcup_dns (v2.9.27) — module
pip
Install with pip install ansible==2.9.27
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 netcup_dns: api_key: "..." api_password: "..." customer_id: "..." domain: "example.com" name: "mail" type: "A" value: "127.0.0.1"
- name: Delete that record 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 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 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 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 state: choices: - present - absent default: present description: - Whether the record should exist or not required: false value: description: - Record value required: true domain: description: - Domainname the records should be added / removed required: true record: aliases: - name default: '@' description: - Record to add or delete, supports wildcard (*). Default is C(@) (e.g. the zone name) api_key: description: - API key for authentification, must be obtained via the netcup CCP (U(https://ccp.netcup.net)) required: true priority: description: - Record priority. Required for C(type=MX) required: false customer_id: description: - Netcup customer id required: true api_password: description: - API password for authentification, must be obtained via the netcup CCP (https://ccp.netcup.net) required: true
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