Files
ansible-pull/roles/nameserver/tasks/configure_bind_snmpd.yml
T
rene 598506f58d fix base PPA cleanup, marker file post-run, and bind snmpd validation
- base: drop leftover apt_repository removal + equivalents debug (undefined on Ubuntu resolute), clean ansible.list via file module for all debian-based distros
- local.yml: default ansible_pull_marker_file in post-run so a cooldown end_play does not abort the run
- nameserver: validate named config against main named.conf instead of isolated %s; add named_conf to debian/archlinux vars
2026-10-22 15:58:01 +02:00

45 lines
1.1 KiB
YAML
Executable File

- name: nameserver | snmpd | install needed modules
package:
name: "{{ perl_readbackwards }}"
state: present
- name: nameserver | snmpd | get script
get_url:
url: "https://github.com/librenms/librenms-agent/raw/master/snmp/bind"
dest: "/etc/snmp/bind"
mode: "0755"
owner: "root"
group: "root"
- name: nameserver | snmpd | create configuration
copy:
dest: "/etc/snmp/bind.conf"
src: "snmpd_bind.conf"
mode: "0644"
owner: "root"
group: "root"
- name: nameserver | snmpd | create statistics file
file:
path: /var/cache/bind/stats
state: touch
owner: "bind"
group: "bind"
- name: nameserver | snmpd | configure named for statistics
lineinfile:
path: "{{ named_conf_options }}"
state: present
line: '\tstatistics-file "/var/cache/bind/stats";\n\tzone-statistics yes;'
insertafter: "options {"
validate: "{{ named_checkconf }} {{ named_conf }}"
notify: restart_named
- name: nameserver | snmpd | configure extend
lineinfile:
path: "{{ snmpd_conf }}"
state: present
line: "extend bind /etc/snmp/bind"
insertafter: "# SECTION: Extends"
notify: restart_snmpd