ansible-role-openvpn icon indicating copy to clipboard operation
ansible-role-openvpn copied to clipboard

openvpn_custom_dns option does not work

Open oliver opened this issue 3 years ago • 0 comments

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.

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 from openvpn_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 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

oliver avatar Sep 12 '21 10:09 oliver