aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/roles/snmp/tasks
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly.no>2017-04-19 18:17:40 +0200
committerKristian Lyngstol <kly@kly.no>2017-04-19 18:17:40 +0200
commit4e04c35f04c264d728587a54d0515eef0a42a44b (patch)
tree7850ac76ba7d494014ecc97d54322567ed44af5d /ansible/roles/snmp/tasks
parent5bd19932a886eae468fea8bcb0e30c78f1d45141 (diff)
build/: Make room for new deployment scheme
Diffstat (limited to 'ansible/roles/snmp/tasks')
-rw-r--r--ansible/roles/snmp/tasks/main.yml23
1 files changed, 23 insertions, 0 deletions
diff --git a/ansible/roles/snmp/tasks/main.yml b/ansible/roles/snmp/tasks/main.yml
new file mode 100644
index 0000000..2cb7165
--- /dev/null
+++ b/ansible/roles/snmp/tasks/main.yml
@@ -0,0 +1,23 @@
+- file:
+ path: /opt/gondul/data
+ state: directory
+ mode: 0755
+- stat:
+ path: /opt/gondul/data/mibs
+ register: mibdir
+- name: Get mibs
+ command: /opt/gondul/extras/tools/get_mibs.sh
+ args:
+ chdir: /opt/gondul/data/
+ when: not mibdir.stat.exists
+ notify: restart gondul-snmp
+- name: Add systemd service file for gondul-snmp
+ copy:
+ dest: /etc/systemd/system/gondul-snmp.service
+ src: gondul-snmp.service
+ notify: restart gondul-snmp
+- name: Enable snmp service
+ systemd:
+ name: gondul-snmp.service
+ enabled: yes
+ notify: restart gondul-snmp