Files
ansible-pull/roles/nameserver/tasks/configure_unbound_snmpd.yml

28 lines
834 B
YAML

- name: "Nameserver: unbound | snmpd | get script"
get_url:
url: "https://github.com/librenms/librenms-agent/raw/master/snmp/unbound"
dest: "/etc/snmp/unbound"
mode: "0755"
owner: "root"
group: "root"
- name: "Nameserver: unbound | snmpd | remove powerdns-recursor script"
file:
path: "/etc/snmp/powerdns-recursor"
state: absent
- name: "Nameserver: unbound | snmpd | configure extend"
lineinfile:
path: "{{ snmpd_conf }}"
state: present
line: "extend unbound {{ sudo }} /etc/snmp/unbound"
insertafter: "# SECTION: Extends"
notify: restart_snmpd
- name: "Nameserver: unbound | snmpd | remove powerdns-recursor extend"
lineinfile:
path: "{{ snmpd_conf }}"
state: absent
line: "extend powerdns-recursor {{ sudo }} /etc/snmp/powerdns-recursor"
notify: restart_snmpd