community.general.udm_dns_record module – Manage dns entries on a univention corporate server
Note
This module is part of the community.general collection (version 10.1.0).
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
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.general.udm_dns_record
.
Synopsis
This module allows to manage dns records on a univention corporate server (UCS). It uses the python API of the UCS to create a new object or edit it.
Requirements
The below requirements are needed on the host that executes this module.
Univention
ipaddress (for
type=ptr_record
)
Parameters
Parameter |
Comments |
---|---|
Additional data for this record, for example Required if Default: |
|
Name of the record, this is also the DNS record. E.g. www for www.example.com. For PTR records this has to be the IP address. |
|
Whether the dns record is present or not. Choices:
|
|
Define the record type. The available choices are: |
|
Corresponding DNS zone for this record, e.g. example.com. For PTR records this has to be the full reverse zone (for example |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in |
|
Support: partial |
Will return details on what has changed (or possibly needs changing in |
Examples
- name: Create a DNS record on a UCS
community.general.udm_dns_record:
name: www
zone: example.com
type: host_record
data:
a:
- 192.0.2.1
- 2001:0db8::42
- name: Create a DNS v4 PTR record on a UCS
community.general.udm_dns_record:
name: 192.0.2.1
zone: 2.0.192.in-addr.arpa
type: ptr_record
data:
ptr_record: "www.example.com."
- name: Create a DNS v6 PTR record on a UCS
community.general.udm_dns_record:
name: 2001:db8:0:0:0:ff00:42:8329
zone: 2.4.0.0.0.0.f.f.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa
type: ptr_record
data:
ptr_record: "www.example.com."