From ec8af08f58f1105c52655a2f13c97b71d36b9ec3 Mon Sep 17 00:00:00 2001 From: Niclas Thobaben Date: Mon, 27 Dec 2021 21:43:33 +0100 Subject: [PATCH] fixed inalid dns test --- tasks/04-test-changes.yml | 2 +- tasks/05-rollback.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/04-test-changes.yml b/tasks/04-test-changes.yml index 89938ce..38955b9 100644 --- a/tasks/04-test-changes.yml +++ b/tasks/04-test-changes.yml @@ -1,7 +1,7 @@ # Test if all defined zones are locally available and do a rollback if not - name: "Test zone {{zone.name}}" - shell: "dig {{item.type | default('CNAME')}} {{ item.name | default('') + (item.name is defined | ternary('.', '')) + zone.name}} @localhost +short | grep -w '{{item.rdata | default('www')}}' -c" + shell: "dig {{item.type | default('CNAME')}} {{ item.name | default('') + (item.name is defined | ternary('.', '')) + zone.name}} @localhost +short" register: dig_result changed_when: dig_result.rc != 0 failed_when: dig_result.rc != 0 diff --git a/tasks/05-rollback.yml b/tasks/05-rollback.yml index ec76419..29eb1fe 100644 --- a/tasks/05-rollback.yml +++ b/tasks/05-rollback.yml @@ -5,7 +5,7 @@ copy: remote_src: true src: /etc/bind/named.conf.local.bak - dest: /ect/bind/named.conf.local + dest: /etc/bind/named.conf.local owner: bind group: bind mode: 0644