- 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