added DNS resolver option powerdns-recursor

This commit is contained in:
2024-07-22 14:51:30 +02:00
parent 11a60747ed
commit 0dc1871268
7 changed files with 86 additions and 12 deletions

View File

@@ -0,0 +1,27 @@
- name: "Nameserver: powerdns-recursor | snmpd | get script"
get_url:
url: "https://github.com/librenms/librenms-agent/raw/master/snmp/powerdns-recursor"
dest: "/etc/snmp/powerdns-recursor"
mode: "0755"
owner: "root"
group: "root"
- name: "Nameserver: powerdns-recursor | snmpd | remove unbound script"
file:
path: "/etc/snmp/unbound"
state: absent
- name: "Nameserver: powerdns-recursor | snmpd | configure extend"
lineinfile:
path: "{{ snmpd_conf }}"
state: present
line: "extend powerdns-recursor {{ sudo }} /etc/snmp/powerdns-recursor"
insertafter: "# SECTION: Extends"
notify: restart_snmpd
- name: "Nameserver: powerdns-recursor | snmpd | remove unbound extend"
lineinfile:
path: "{{ snmpd_conf }}"
state: absent # not required. choices: absent;present. Whether the line should be there or not.
line: "extend unbound {{ sudo }} /etc/snmp/unbound"
notify: restart_snmpd