From c6328681a1c2e9674052c6a4ef839775a2adccd5 Mon Sep 17 00:00:00 2001 From: rene Date: Thu, 24 Mar 2022 15:30:50 +0100 Subject: [PATCH] restart named and linebreak --- roles/nameserver/tasks/configure_bind_snmpd.yml | 2 +- roles/nameserver/tasks/main.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/nameserver/tasks/configure_bind_snmpd.yml b/roles/nameserver/tasks/configure_bind_snmpd.yml index a03aea0..3c3a89f 100644 --- a/roles/nameserver/tasks/configure_bind_snmpd.yml +++ b/roles/nameserver/tasks/configure_bind_snmpd.yml @@ -30,7 +30,7 @@ lineinfile: path: "{{ named_conf_options }}" # required. The file to modify. Before Ansible 2.3 this option was only usable as I(dest), I(destfile) and I(name). state: present - line: 'statistics-file "/var/cache/bind/stats"; zone-statistics yes;' + line: '\tstatistics-file "/var/cache/bind/stats";\n\tzone-statistics yes;' insertafter: "options {" validate: /usr/sbin/named-checkconf %s notify: restart_named diff --git a/roles/nameserver/tasks/main.yml b/roles/nameserver/tasks/main.yml index 9788e09..a3291a3 100644 --- a/roles/nameserver/tasks/main.yml +++ b/roles/nameserver/tasks/main.yml @@ -12,6 +12,7 @@ - include_tasks: configure_bind_snmpd.yml rescue: - set_fact: task_failed=true + notify: restart_named when: bind == true - block: