Documentation

nsupdate - Manage DNS records.

New in version 2.3.

Synopsis

Options

parameter required default choices comments
key_algorithm
no
  • HMAC-MD5.SIG-ALG.REG.INT
  • hmac-md5
  • hmac-sha1
  • hmac-sha224
  • hmac-sha256
  • hamc-sha384
  • hmac-sha512
Specify key algorithm used by key_secret.
key_name
no
Use TSIG key name to authenticate against DNS server
key_secret
no 7911
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
  • absent
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
zone DNS record zone success string example.org.
changed If module has modified record success string
value DNS record value success string 192.168.1.1
record DNS record success string ansible
dns_rc dnspython return code always int 4
ttl DNS record TTL success int 86400
type DNS record type success string CNAME
dns_rc_str dnspython return code (string representation) always string REFUSED


Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Support

This module is community maintained without core committer oversight.

For more information on what this means please read Module Support

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.