summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2018-09-01 14:57:53 +0200
committerChristian Poessinger <christian@poessinger.com>2018-09-01 14:57:53 +0200
commitd48e5d8d196365862feae6943e97cbc803469cbb (patch)
tree73f27b0a001b72bfeb1e9bea16eb56af40271e88
parentbfde18e1064d0622d1eb022ffca2fa9a95bace0f (diff)
downloadvyos-1x-d48e5d8d196365862feae6943e97cbc803469cbb.tar.gz
vyos-1x-d48e5d8d196365862feae6943e97cbc803469cbb.zip
snmp.py: beautify generated snmp.conf #2
-rwxr-xr-xsrc/conf_mode/snmp.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/conf_mode/snmp.py b/src/conf_mode/snmp.py
index ef5db4690..a4e776d49 100755
--- a/src/conf_mode/snmp.py
+++ b/src/conf_mode/snmp.py
@@ -60,12 +60,12 @@ clientaddr {{ trap_source }}
# SNMPS template - be careful if you edit the template.
access_config_tmpl = """
### Autogenerated by snmp.py ###
-{% if v3_users %}
-{% for u in v3_users %}
+{%- for u in v3_users %}
{{ u.mode }}user {{ u.name }}
-{% endfor %}
-{% endif -%}
+{%- endfor %}
+
rwuser {{ vyos_user }}
+
"""
# SNMPS template - be careful if you edit the template.