ansible/roles/snmpd/templates/snmpd.conf.j2
2023-04-02 14:25:09 +02:00

22 lines
582 B
Django/Jinja

{{ ansible_managed | comment }}
sysName {{ snmpd__sys_name }}
sysLocation {{ snmpd__sys_location }}
sysContact {{ snmpd__sys_contact }}
sysServices {{ snmpd__sys_services }}
master agentx
agentaddress 127.0.0.1,[::1]
{% for view, included in snmpd__views.items() %}
{% for oid in included %}
view {{ view }} included {{ oid }}
{% endfor %}
{% endfor %}
{% for name, user in snmpd__users.items() %}
createUser {{ name }} SHA-512 {{ user.auth | enquote }} AES {{ user.priv | enquote }}
rouser {{ name }} authpriv -V {{ user.view }}
{% endfor %}
includeDir /etc/snmp/snmpd.conf.d