Make snmpd less verbose on debian Stretch.

This commit is contained in:
Markus 2017-10-02 12:14:50 +02:00
parent d25a83830a
commit 983189fb46
3 changed files with 13 additions and 17 deletions

View File

@ -1,11 +1,3 @@
# This file controls the activity of snmpd
# Don't load any MIBs by default.
# You might comment this lines once you have the MIBs downloaded.
export MIBS=
# snmpd control (yes means start daemon).
SNMPDRUN=yes
# snmpd options (use syslog, close stdin/out/err).
SNMPDOPTS='-LSed -Lf /dev/null -u snmp -g snmp -I -smux,mteTrigger,mteTriggerConf -p /run/snmpd.pid'
[Service]
ExecStart=
ExecStart=/usr/sbin/snmpd -LSed -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f

View File

@ -1,5 +1,8 @@
---
- name: Reload systemd
command: systemctl daemon-reload
- name: Restart snmpd
service: name=snmpd state=restarted

View File

@ -2,21 +2,22 @@
- name: Install snmpd
apt: name=snmpd
tags: snmp
- name: Create snmpd service override directory
file: path=/etc/systemd/system/snmpd.service.d state=directory
- name: Make snmpd less verbose
copy: src=snmpd dest=/etc/default/snmpd
notify: Restart snmpd
tags: snmp
copy: src=snmpd dest=/etc/systemd/system/snmpd.service.d/local.conf
notify:
- Reload systemd
- Restart snmpd
- name: Configure snmpd
template: src=snmpd.conf.j2 dest=/etc/snmp/snmpd.conf
notify: Restart snmpd
tags: snmp
- name: Start the snmpd service
service: name=snmpd state=started enabled=yes
tags: snmp
- name: Install misc software
apt: name={{ item }}