New in version 2015.8.0.
Runner to interact with DNS server and create/delete/update DNS records
Nitin Madhok <nmadhok@g.clemson.edu>
Create both A and PTR (reverse) records for a host.
CLI Example:
salt-run ddns.add_host domain.com my-test-vm 3600 10.20.30.40 my-tsig-key /etc/salt/tsig.keyring 10.0.0.1 5
Create a DNS record. The nameserver must be an IP address and the master running this runner must have create privileges on that server.
CLI Example:
salt-run ddns.create domain.com my-test-vm 3600 A 10.20.30.40 my-tsig-key /etc/salt/tsig.keyring 10.0.0.1 5
Delete a DNS record.
CLI Example:
salt-run ddns.delete domain.com my-test-vm my-tsig-key /etc/salt/tsig.keyring 10.0.0.1 5 A
Delete both forward (A) and reverse (PTR) records for a host only if the forward (A) record exists.
CLI Example:
salt-run ddns.delete_host domain.com my-test-vm my-tsig-key /etc/salt/tsig.keyring 10.0.0.1 5
Replace, or update a DNS record. The nameserver must be an IP address and the master running this runner must have update privileges on that server.
Note
If replace
is set to True, all records for this name and type will first be deleted and
then recreated. Default is replace=False
.
CLI Example:
salt-run ddns.update domain.com my-test-vm 3600 A 10.20.30.40 my-tsig-key /etc/salt/tsig.keyring 10.0.0.1 5