aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/roles/snmp/tasks/main.yml
blob: 6056a25cfecf8aece86411a61888d84a868082a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
- name: Create data directory
  file:
    path: /opt/gondul/data
    state: directory
    mode: 0755
- name: register mibdir
  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