summaryrefslogtreecommitdiff
path: root/roles/network/bind/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/network/bind/tasks/main.yml')
-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: