community / community.general / 8.5.0 / module / udm_dns_record Manage dns entries on a univention corporate server Authors: Tobias Rüetschi (@keachi)community.general.udm_dns_record (8.5.0) — module
Install with ansible-galaxy collection install community.general:==8.5.0
collections: - name: community.general version: 8.5.0
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.
- 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."
data: default: {} description: - 'Additional data for this record, for example V({''a'': ''192.0.2.1''}).' - Required if O(state=present). type: dict name: description: - 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. required: true type: str type: description: - Define the record type. V(host_record) is a A or AAAA record, V(alias) is a CNAME, V(ptr_record) is a PTR record, V(srv_record) is a SRV record and V(txt_record) is a TXT record. - 'The available choices are: V(host_record), V(alias), V(ptr_record), V(srv_record), V(txt_record).' required: true type: str zone: description: - Corresponding DNS zone for this record, e.g. example.com. - For PTR records this has to be the full reverse zone (for example V(1.1.192.in-addr.arpa)). required: true type: str state: choices: - present - absent default: present description: - Whether the dns record is present or not. type: str