nsupdate - Manage DNS records.
New in version 2.3.
Synopsis
- Create, update and remove DNS records using DDNS updates
- DDNS works well with both bind and Microsoft DNS (see https://technet.microsoft.com/en-us/library/cc961412.aspx)
Requirements (on host that executes module)
- dnspython
Options
parameter | required | default | choices | comments |
---|---|---|---|---|
key_algorithm | no | hmac-md5 |
| Specify key algorithm used by key_secret . |
key_name | no | Use TSIG key name to authenticate against DNS server
| ||
key_secret | no | Use TSIG key secret, associated with key_name , to authenticate against server
| ||
record | yes | Sets the DNS record to modify. | ||
server | yes | Apply DNS modification on this server. | ||
state | no | present |
| Manage DNS record. |
ttl | no | 3600 | Sets the record TTL. | |
type | no | A | Sets the record type. | |
value | no | None | Sets the record value. | |
zone | yes | DNS record will be modified on this zone . |
Examples
- name: Add or modify ansible.example.org A to 192.168.1.1" nsupdate: key_name: "nsupdate" key_secret: "+bFQtBCta7j2vWkjPkAFtgA==" server: "10.1.1.1" zone: "example.org" record: "ansible" value: "192.168.1.1" - name: Remove puppet.example.org CNAME nsupdate: key_name: "nsupdate" key_secret: "+bFQtBCta7j2vWkjPkAFtgA==" server: "10.1.1.1" zone: "example.org" record: "puppet" type: "CNAME" state: absent
Return Values
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
changed | If module has modified record | success | string | |
dns_rc | dnspython return code | always | int | 4 |
dns_rc_str | dnspython return code (string representation) | always | string | REFUSED |
record | DNS record | success | string | ansible |
ttl | DNS record TTL | success | int | 86400 |
type | DNS record type | success | string | CNAME |
value | DNS record value | success | string | 192.168.1.1 |
zone | DNS record zone | success | string | example.org. |
Status
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/nsupdate_module.html