From 3cad590b3f53d98cf43013bed86cb51d2bb3c7b9 Mon Sep 17 00:00:00 2001
From: Hinrikus Wolf <hinrikus@cs.rwth-aachen.de>
Date: Tue, 25 Oct 2016 11:58:07 +0200
Subject: [PATCH] zabbix: add prerequisites for snmp features for zabbix

---
 zabbix-server/files/snmp.conf |  5 +++++
 zabbix-server/tasks/snmp.yml  | 22 ++++++++++++++++++++++
 2 files changed, 27 insertions(+)
 create mode 100644 zabbix-server/files/snmp.conf
 create mode 100644 zabbix-server/tasks/snmp.yml

diff --git a/zabbix-server/files/snmp.conf b/zabbix-server/files/snmp.conf
new file mode 100644
index 0000000..a9df185
--- /dev/null
+++ b/zabbix-server/files/snmp.conf
@@ -0,0 +1,5 @@
+#
+# As the snmp packages come without MIB files due to license reasons, loading
+# of MIBs is disabled by default. If you added the MIBs you can reenable
+# loaging them by commenting out the following line.
+#mibs:
diff --git a/zabbix-server/tasks/snmp.yml b/zabbix-server/tasks/snmp.yml
new file mode 100644
index 0000000..f4791c4
--- /dev/null
+++ b/zabbix-server/tasks/snmp.yml
@@ -0,0 +1,22 @@
+---
+- name: ensure snmp software is installed
+  apt: name={{ item }} state=latest
+  with_items:
+    - snmp
+    - snmp-mibs-downloader
+  tags:
+    - snmp
+    - software
+
+- name: ensure the correct snmp.conf is present
+  copy: src=snmp.conf dest=/etc/snmp/snmp.conf
+  tags: 
+    - snmp
+    - config
+
+- name: ensure the snmp MIB libs are present
+  command: download-mibsmibs
+  tags:
+    - snmp
+
+
-- 
GitLab