Ensure a DNS record is present or absent utilizing RFC 2136 type dynamic updates.
Note
The dnspython
module is required when managing DDNS using a TSIG key.
If you are not using a TSIG key, DDNS is allowed by ACLs based on IP
address and the dnspython
module is not required.
Example:
webserver:
ddns.present:
- zone: example.com
- ttl: 60
- data: 111.222.333.444
- nameserver: 123.234.345.456
- keyfile: /srv/salt/dnspy_tsig_key.txt
Ensures that the named DNS record is absent.
The host portion of the DNS record, e.g., 'webserver'. Name and zone are concatenated when the entry is created unless name includes a trailing dot, so make sure that information is not duplicated in these two arguments.
The zone to check
Data for the DNS record. E.g., the IP address for an A record. If omitted, all records matching name (and rdtype, if provided) will be purged.
DNS resource type. If omitted, all types will be purged.
**kwargs
Additional arguments the ddns.update function may need (e.g. nameserver, keyfile, keyname). Note that the nsupdate key file can’t be reused by this function, the keyfile and other arguments must follow the dnspython spec.
Ensures that the named DNS record is present with the given ttl.
The host portion of the DNS record, e.g., 'webserver'. Name and zone are concatenated when the entry is created unless name includes a trailing dot, so make sure that information is not duplicated in these two arguments.
The zone to check/update
TTL for the record
Data for the DNS record. E.g., the IP address for an A record.
DNS resource type. Default 'A'.
**kwargs
Additional arguments the ddns.update function may need (e.g. nameserver, keyfile, keyname). Note that the nsupdate key file can’t be reused by this function, the keyfile and other arguments must follow the dnspython spec.