From b5406d18de64f273cbebb3875a84bc31074f0f00 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 10 Nov 2022 19:31:09 +0100 Subject: prometheus: add exporter for bind --- roles/network/bind/tasks/main.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'roles/network/bind/tasks') 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: -- cgit v1.2.3