kyl191 / ansible-role-openvpn

Ansible Playbook for OpenVPN on CentOS/Fedora/RHEL clones
MIT License
246 stars 219 forks source link

openvpn_custom_dns option does not work #166

Open oliver opened 3 years ago

oliver commented 3 years ago

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: