summaryrefslogtreecommitdiff
path: root/roles/network/bind/tasks
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2022-11-10 19:31:09 +0100
committerChristian Pointner <equinox@spreadspace.org>2022-11-10 19:31:09 +0100
commitb5406d18de64f273cbebb3875a84bc31074f0f00 (patch)
treee8774b1cb9b6124d14f5ec76ca103a7427de2b52 /roles/network/bind/tasks
parentadd ch-pan and ch-mimas to prometheus monitoring (diff)
prometheus: add exporter for bind
Diffstat (limited to 'roles/network/bind/tasks')
-rw-r--r--roles/network/bind/tasks/main.yml22
1 files changed, 22 insertions, 0 deletions
diff --git a/roles/network/bind/tasks/main.yml b/roles/network/bind/tasks/main.yml
index 2303e76c..49898162 100644
--- a/roles/network/bind/tasks/main.yml
+++ b/roles/network/bind/tasks/main.yml
@@ -89,6 +89,28 @@
notify: reload bind
+- name: add stats configuration
+ when: bind_stats_channels is defined
+ template:
+ src: stats.j2
+ dest: /etc/bind/named.conf.stats
+ notify: reload bind
+
+- name: remove stats configuration
+ when: bind_stats_channels is not defined
+ file:
+ path: /etc/bind/named.conf.stats
+ state: absent
+ notify: reload bind
+
+- name: enable/disable stats configuration
+ lineinfile:
+ path: /etc/bind/named.conf
+ line: 'include "/etc/bind/named.conf.stats";'
+ state: "{{ bind_stats_channels is defined | ternary('present', 'absent') }}"
+ notify: reload bind
+
+
- name: add slave zone configuration
when: bind_slave_zones is defined
template: