diff --git a/snmp/files/snmpd.conf b/snmp/files/snmpd.conf index 7bfef37..36c8927 100644 --- a/snmp/files/snmpd.conf +++ b/snmp/files/snmpd.conf @@ -510,7 +510,7 @@ createUser {{ user.username }} {{ user.get('authproto', 'MD5') }} {{ user.get('a {%- endfor %} {% for declaration, values in config.items() %} -{%- if values.__class__ in (().__class__, [].__class__) %} +{%- if values is sequence and values is not mapping and values is not string %} {%- for value in values %} {{declaration}} {{value}} {%- endfor %} diff --git a/snmp/files/snmpd.conf.minimal b/snmp/files/snmpd.conf.minimal index f185ed3..b596b0d 100644 --- a/snmp/files/snmpd.conf.minimal +++ b/snmp/files/snmpd.conf.minimal @@ -83,7 +83,7 @@ createUser {{ user.username }} {{ user.get('authproto', 'MD5') }} {{ user.passph # Extra settings {% for declaration, values in config.items() %} -{%- if values.__class__ in (().__class__, [].__class__) %} +{%- if values is sequence and values is not mapping and values is not string %} {%- for value in values %} {{declaration}} {{value}} {%- endfor %}