diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-04-18 12:09:50 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-04-18 12:09:50 +0200 |
commit | 217f5d42e17ae5dd55adaab1114cacc7f5a2e280 (patch) | |
tree | c78ca41794f7df690604d0ca43d3853e6cb1b192 /src/conf_mode | |
parent | e3a6e7f1a55299822da3b2705cbe8c0f787d46e0 (diff) | |
download | vyos-1x-217f5d42e17ae5dd55adaab1114cacc7f5a2e280.tar.gz vyos-1x-217f5d42e17ae5dd55adaab1114cacc7f5a2e280.zip |
openvpn: T4353: fix Jinja2 linting errors
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/interfaces-openvpn.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/conf_mode/interfaces-openvpn.py b/src/conf_mode/interfaces-openvpn.py index 83d1c6d9b..a9be093c2 100755 --- a/src/conf_mode/interfaces-openvpn.py +++ b/src/conf_mode/interfaces-openvpn.py @@ -608,7 +608,7 @@ def generate(openvpn): # Generate User/Password authentication file if 'authentication' in openvpn: - render(openvpn['auth_user_pass_file'], 'openvpn/auth.pw.tmpl', openvpn, + render(openvpn['auth_user_pass_file'], 'openvpn/auth.pw.j2', openvpn, user=user, group=group, permission=0o600) else: # delete old auth file if present @@ -624,16 +624,16 @@ def generate(openvpn): # Our client need's to know its subnet mask ... client_config['server_subnet'] = dict_search('server.subnet', openvpn) - render(client_file, 'openvpn/client.conf.tmpl', client_config, + render(client_file, 'openvpn/client.conf.j2', client_config, user=user, group=group) # we need to support quoting of raw parameters from OpenVPN CLI # see https://phabricator.vyos.net/T1632 - render(cfg_file.format(**openvpn), 'openvpn/server.conf.tmpl', openvpn, + render(cfg_file.format(**openvpn), 'openvpn/server.conf.j2', openvpn, formater=lambda _: _.replace(""", '"'), user=user, group=group) # Render 20-override.conf for OpenVPN service - render(service_file.format(**openvpn), 'openvpn/service-override.conf.tmpl', openvpn, + render(service_file.format(**openvpn), 'openvpn/service-override.conf.j2', openvpn, formater=lambda _: _.replace(""", '"'), user=user, group=group) # Reload systemd services config to apply an override call(f'systemctl daemon-reload') |