Note
This plugin is part of the community.general collection (version 3.8.1).
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
.
To use it in a playbook, specify: community.general.udm_dns_record
.
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
data dictionary | Default: {} | Additional data for this record, e.g. ['a': '192.0.2.1']. Required if state=present . |
name string / required | 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. | |
state string |
| Whether the dns record is present or not. |
type string / required | Define the record type. host_record is a A or AAAA record, alias is a CNAME, ptr_record is a PTR record, srv_record is a SRV record and txt_record is a TXT record.The available choices are: host_record , alias , ptr_record , srv_record , txt_record . | |
zone string / required | Corresponding DNS zone for this record, e.g. example.com. For PTR records this has to be the full reverse zone (for example 1.1.192.in-addr.arpa ). |
- 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."
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/general/udm_dns_record_module.html