From 7d43f2b260a72534deed446b785501b6020b72c2 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sat, 1 Oct 2022 20:10:46 +0200 Subject: [PATCH] updated openvpn_client state --- states/openvpn_client/vpn.conf.j2 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/states/openvpn_client/vpn.conf.j2 b/states/openvpn_client/vpn.conf.j2 index 56b3864..4e43277 100644 --- a/states/openvpn_client/vpn.conf.j2 +++ b/states/openvpn_client/vpn.conf.j2 @@ -26,4 +26,12 @@ persist-tun compress lzo fast-io +{% for k,v in salt['network.interfaces']().items() -%} +{%- if k.startswith('en') or k.startswith('eth') %} +{% for net in salt['network.subnets'](k) -%} +pull-filter ignore "route {{ net.split("/")[0] }}" +{%- endfor %} +{%- endif %} +{%- endfor %} + auth-user-pass private/pass \ No newline at end of file