salt.modules.ddns

Support for RFC 2136 dynamic DNS updates.

depends
  • dnspython Python module

configuration

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
              (default='HMAC-MD5.SIG-ALG.REG.INT').
    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='127.0.0.1', 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 example.com host1 60 10.1.1.1
salt.modules.ddns.delete(zone, name, rdtype=None, data=None, nameserver='127.0.0.1', timeout=5, port=53, **kwargs)

Delete a DNS record.

CLI Example:

salt ns1 ddns.delete example.com host1 A
salt.modules.ddns.delete_host(zone, name, nameserver='127.0.0.1', 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 example.com host1
salt.modules.ddns.update(zone, name, ttl, rdtype, data, nameserver='127.0.0.1', 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 example.com host1 60 A 10.0.0.1