netcup_dns - manage Netcup DNS records¶
New in version 2.7.0.
Synopsis¶
- Manages DNS records via the Netcup API, see the docs https://ccp.netcup.net/run/webservice/servers/endpoint.php
Requirements¶
The below requirements are needed on the host that executes this module.
- nc-dnsapi >= 0.1.3
Parameters¶
Parameter | Choices/Defaults | Comments |
---|---|---|
api_key
required |
API key for authentification, must be obtained via the netcup CCP (https://ccp.netcup.net)
|
|
api_password
required |
API password for authentification, must be obtained via the netcup CCP (https://ccp.netcup.net)
|
|
customer_id
required |
Netcup customer id
|
|
domain
required |
Domainname the records should be added / removed
|
|
priority |
Record priority. Required for
type=MX |
|
record |
Default: @
|
Record to add or delete, supports wildcard (*). Default is
@ (e.g. the zone name)aliases: name |
solo
bool |
|
Whether the record should be the only one for that record type and record name. Only use with
state=present This will delete all other records with the same record name and type.
|
state |
|
Whether the record should exist or not
|
type
required |
|
Record type
|
value
required |
Record value
|
Examples¶
- 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
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description | |
---|---|---|---|
records
complex
|
success |
list containing all records
|
|
priority
int
|
success |
the record priority (only relevant if type=MX)
|
|
type
string
|
succcess |
the record type
Sample:
A
|
|
name
string
|
success |
the record name
Sample:
fancy-hostname
|
|
value
string
|
success |
the record destination
Sample:
127.0.0.1
|
|
id
int
|
success |
internal id of the record
Sample:
12345
|
Status¶
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
Maintenance¶
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Author¶
- Nicolai Buchwitz (@nbuchwitz)
Hint
If you notice any issues in this documentation you can edit this document to improve it.