The openvpn_custom_dns option which is described in the README file does not actually work. Even if I set openvpn_custom_dns to a list of servers and also set openvpn_set_dns to true, my custom DNS server is not pushed to the clients.
document the current behavior, which in my understanding is this:
openvpn_dns_servers is the list of DNS servers to use
openvpn_custom_dns is a bool value that must be set to true to actually use the entries from openvpn_dns_servers (rather than the Google/Cloudflare servers)
openvpn_set_dns must be set to true as well to use the values from openvpn_dns_servers
simplify the current behavior: remove openvpn_custom_dns from code and documentation, and use only openvpn_dns_servers
The
openvpn_custom_dns
option which is described in the README file does not actually work. Even if I setopenvpn_custom_dns
to a list of servers and also setopenvpn_set_dns
to true, my custom DNS server is not pushed to the clients.I think the problem is that templates/server.conf.j2 uses the
openvpn_dns_servers
variable (in https://github.com/kyl191/ansible-role-openvpn/blob/master/templates/server.conf.j2#L64) rather than using the values fromopenvpn_custom_dns
.I see two solutions:
document the current behavior, which in my understanding is this:
openvpn_dns_servers
is the list of DNS servers to useopenvpn_custom_dns
is a bool value that must be set to true to actually use the entries fromopenvpn_dns_servers
(rather than the Google/Cloudflare servers)openvpn_set_dns
must be set to true as well to use the values fromopenvpn_dns_servers
simplify the current behavior: remove
openvpn_custom_dns
from code and documentation, and use onlyopenvpn_dns_servers