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

@@ -1,4 +1,4 @@
- name: nameserver | snmpd | get script
- name: "Nameserver: unbound | snmpd | get script"
get_url:
url: "https://github.com/librenms/librenms-agent/raw/master/snmp/unbound"
dest: "/etc/snmp/unbound"
@@ -6,10 +6,22 @@
owner: "root"
group: "root"
- name: nameserver | snmpd | configure extend
- 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
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