Support for RFC 2136 dynamic DNS updates.

  • dnspython Python module

If you want to use TSIG authentication for the server, there are a couple of optional configuration parameters made available to support this (the keyname is only needed if the keyring contains more than one key):

keyfile: keyring file (default=None)
keyname: key name in file (default=None)
keyalgorithm: algorithm used to create the key
    Other possible values: hmac-sha1, hmac-sha224, hmac-sha256,
        hmac-sha384, hmac-sha512

The keyring file needs to be in json format and the key name needs to end with an extra period in the file, similar to this:

{"keyname.": "keycontent"}
salt.modules.ddns.add_host(zone, name, ttl, ip, nameserver='', replace=True, timeout=5, port=53, **kwargs)

Add, replace, or update the A and PTR (reverse) records for a host.

CLI Example:

salt ns1 ddns.add_host host1 60
salt.modules.ddns.delete(zone, name, rdtype=None, data=None, nameserver='', timeout=5, port=53, **kwargs)

Delete a DNS record.

CLI Example:

salt ns1 ddns.delete host1 A
salt.modules.ddns.delete_host(zone, name, nameserver='', timeout=5, port=53, **kwargs)

Delete the forward and reverse records for a host.

Returns true if any records are deleted.

CLI Example:

salt ns1 ddns.delete_host host1
salt.modules.ddns.update(zone, name, ttl, rdtype, data, nameserver='', timeout=5, replace=False, port=53, **kwargs)

Add, replace, or update a DNS record. nameserver must be an IP address and the minion running this module must have update privileges on that server. If replace is true, first deletes all records for this name and type.

CLI Example:

salt ns1 ddns.update host1 60 A