diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-04-11 20:56:45 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-04-11 20:56:45 +0200 |
commit | 47838b888aa3e7378ca0270a774cb77635b7f092 (patch) | |
tree | 818b93f0503831e16d692d2178e5345935fc3296 /data/templates/accel-ppp/chap-secrets.config_dict.tmpl | |
parent | 5f164e59aac8ce7b8eba50d3906da87a3bb7a9da (diff) | |
download | vyos-1x-47838b888aa3e7378ca0270a774cb77635b7f092.tar.gz vyos-1x-47838b888aa3e7378ca0270a774cb77635b7f092.zip |
accel-ppp: T4333: migrate to new vyos_defined Jinja2 test
Diffstat (limited to 'data/templates/accel-ppp/chap-secrets.config_dict.tmpl')
-rw-r--r-- | data/templates/accel-ppp/chap-secrets.config_dict.tmpl | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/data/templates/accel-ppp/chap-secrets.config_dict.tmpl b/data/templates/accel-ppp/chap-secrets.config_dict.tmpl index da64b64d5..d4e8bb2aa 100644 --- a/data/templates/accel-ppp/chap-secrets.config_dict.tmpl +++ b/data/templates/accel-ppp/chap-secrets.config_dict.tmpl @@ -1,12 +1,10 @@ # username server password acceptable local IP addresses shaper -{% if authentication is defined and authentication.local_users is defined and authentication.local_users.username is defined %} -{% for user, user_config in authentication.local_users.username.items() %} -{% if user_config.disabled is not defined %} -{% if user_config.rate_limit is defined %} +{% if authentication.local_users.username is vyos_defined %} +{% for user, user_config in authentication.local_users.username.items() if user_config.disabled is not vyos_defined %} +{% if user_config.rate_limit is vyos_defined %} {{ "%-12s" | format(user) }} * {{ "%-16s" | format(user_config.password) }} {{ "%-16s" | format(user_config.static_ip) }} {{ user_config.rate_limit.download }}/{{ user_config.rate_limit.upload }} -{% else %} +{% else %} {{ "%-12s" | format(user) }} * {{ "%-16s" | format(user_config.password) }} {{ "%-16s" | format(user_config.static_ip) }} -{% endif %} {% endif %} {% endfor %} {% endif %} |