New in version 2.3.
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
key_algorithm |
| Specify key algorithm used by key_secret . |
key_name | Use TSIG key name to authenticate against DNS server
| |
key_secret | Use TSIG key secret, associated with key_name , to authenticate against server
| |
port (added in 2.5) | Default: 53 | Use this TCP port when connecting to server . |
record required | Sets the DNS record to modify. When zone is omitted this has to be absolute (ending with a dot). | |
server required | Apply DNS modification on this server. | |
state |
| Manage DNS record. |
ttl | Default: 3600 | Sets the record TTL. |
type | Default: A | Sets the record type. |
value | Sets the record value. | |
zone | DNS record will be modified on this zone .When omitted DNS will be queried to attempt finding the correct zone. Starting with Ansible 2.7 this parameter is optional. |
- 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: Add or modify ansible.example.org A to 192.168.1.1, 192.168.1.2 and 192.168.1.3" nsupdate: key_name: "nsupdate" key_secret: "+bFQtBCta7j2vWkjPkAFtgA==" server: "10.1.1.1" zone: "example.org" record: "ansible" value: ["192.168.1.1", "192.168.1.2", "192.168.1.3"] - 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
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
changed string | success | If module has modified record |
dns_rc int | always | dnspython return code Sample: 4 |
dns_rc_str string | always | dnspython return code (string representation) Sample: REFUSED |
record string | success | DNS record Sample: ansible |
ttl int | success | DNS record TTL Sample: 86400 |
type string | success | DNS record type Sample: CNAME |
value list | success | DNS record value(s) Sample: 192.168.1.1 |
zone string | success | DNS record zone Sample: example.org. |
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
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.
Hint
If you notice any issues in this documentation you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.7/modules/nsupdate_module.html