Set the DNS resolvers of an interface
PUT/api/node/:hostname/dns/:interface_name
Writes a netplan file of the interface's own, such as /etc/netplan/osapi-dns-eth0.yaml for eth0, under the netplan definition that matches the interface, and applies it. A definition that matches several interfaces, such as cloud-init's all for en*, gives each of them the resolvers. An empty list keeps the interface's servers or domains, and an interface with no resolvers yet starts from none. override_dhcp drops the servers DHCP gives. It runs on the Debian family, and elsewhere, and in a container, reports skipped.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 500
Each target host's result, with whether it changed.
The request is not valid, or the host refuses the input, such as a path that is a directory.
Unauthorized - API key required
Forbidden - Insufficient permissions
The host has no dns with that interface_name.
osapi did not deploy the item, so it does not change it, or the host does not have a program that the method needs.
An error on the controller.