forked from infra/ansible
Make snmpd less verbose on debian Stretch.
This commit is contained in:
parent
d25a83830a
commit
983189fb46
@ -1,11 +1,3 @@
|
|||||||
# This file controls the activity of snmpd
|
[Service]
|
||||||
|
ExecStart=
|
||||||
# Don't load any MIBs by default.
|
ExecStart=/usr/sbin/snmpd -LSed -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f
|
||||||
# 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'
|
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
|
- name: Reload systemd
|
||||||
|
command: systemctl daemon-reload
|
||||||
|
|
||||||
- name: Restart snmpd
|
- name: Restart snmpd
|
||||||
service: name=snmpd state=restarted
|
service: name=snmpd state=restarted
|
||||||
|
|
||||||
|
@ -2,21 +2,22 @@
|
|||||||
|
|
||||||
- name: Install snmpd
|
- name: Install snmpd
|
||||||
apt: name=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
|
- name: Make snmpd less verbose
|
||||||
copy: src=snmpd dest=/etc/default/snmpd
|
copy: src=snmpd dest=/etc/systemd/system/snmpd.service.d/local.conf
|
||||||
notify: Restart snmpd
|
notify:
|
||||||
tags: snmp
|
- Reload systemd
|
||||||
|
- Restart snmpd
|
||||||
|
|
||||||
- name: Configure snmpd
|
- name: Configure snmpd
|
||||||
template: src=snmpd.conf.j2 dest=/etc/snmp/snmpd.conf
|
template: src=snmpd.conf.j2 dest=/etc/snmp/snmpd.conf
|
||||||
notify: Restart snmpd
|
notify: Restart snmpd
|
||||||
tags: snmp
|
|
||||||
|
|
||||||
- name: Start the snmpd service
|
- name: Start the snmpd service
|
||||||
service: name=snmpd state=started enabled=yes
|
service: name=snmpd state=started enabled=yes
|
||||||
tags: snmp
|
|
||||||
|
|
||||||
- name: Install misc software
|
- name: Install misc software
|
||||||
apt: name={{ item }}
|
apt: name={{ item }}
|
||||||
|
Loading…
Reference in New Issue
Block a user