xoxys.openvpn_client/templates/etc/openvpn/client.conf.j2
Robert Kaussow a9922dea7f
Some checks reported errors
continuous-integration/drone/push Build was killed
add port variable
2020-05-15 19:11:40 +02:00

32 lines
1010 B
Django/Jinja

#jinja2: lstrip_blocks: True
{{ ansible_managed | comment }}
dev tun
persist-tun
persist-key
cipher {{ openvpn_client_cipher }}
ncp-disable
auth {{ openvpn_client_auth }}
tls-client
client
resolv-retry infinite
remote {{ openvpn_client_server }} {{ openvpn_client_port }}
nobind
{% if openvpn_client_x509_name is defined %}
verify-x509-name "{{ openvpn_client_x509_name }}" name
{% endif %}
{% if openvpn_client_ca_file is defined %}
ca /etc/openvpn/certs/{{ openvpn_client_ca_file }}
{% endif %}
{% if openvpn_client_cert_file is defined and openvpn_client_cert_source is defined %}
cert /etc/openvpn/certs/{{ openvpn_client_cert_file }}
{% endif %}
{% if openvpn_client_key_file is defined and openvpn_client_key_source is defined %}
key /etc/openvpn/certs/{{ openvpn_client_key_file }}
{% endif %}
{% if openvpn_client_ta_file is defined and openvpn_client_ta_source is defined %}
tls-auth /etc/openvpn/certs/{{ openvpn_client_ta_file }}
{% endif %}
key-direction 1
remote-cert-tls server
comp-lzo adaptive