diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-04-13 22:51:33 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-04-13 22:51:33 +0200 |
commit | fc36d67b051bad776a5b1d6e9a04f1205487f01f (patch) | |
tree | cde0812400ef0857d108999ff350d6582b912a49 /data/templates/ocserv/ocserv_passwd.tmpl | |
parent | 2b066e2cb8fe5340c3f32e4c29c75d4f3282363f (diff) | |
download | vyos-1x-fc36d67b051bad776a5b1d6e9a04f1205487f01f.tar.gz vyos-1x-fc36d67b051bad776a5b1d6e9a04f1205487f01f.zip |
ocserv: T4333: migrate to new vyos_defined Jinja2 test
Diffstat (limited to 'data/templates/ocserv/ocserv_passwd.tmpl')
-rw-r--r-- | data/templates/ocserv/ocserv_passwd.tmpl | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/data/templates/ocserv/ocserv_passwd.tmpl b/data/templates/ocserv/ocserv_passwd.tmpl index ffadb4860..30c79d66a 100644 --- a/data/templates/ocserv/ocserv_passwd.tmpl +++ b/data/templates/ocserv/ocserv_passwd.tmpl @@ -1,6 +1,8 @@ #<username>:<group>:<hash> -{% for user in username if username is defined %} -{% if not "disable" in username[user] %} -{{ user }}:*:{{ username[user].hash }} -{% endif %} -{% endfor %}
\ No newline at end of file +{% if username is vyos_defined %} +{% for user, user_config in username.items() %} +{% if user_config.disable is not vyos_defined %} +{{ user }}:*:{{ user_config.hash }} +{% endif %} +{% endfor %} +{% endif %}
\ No newline at end of file |