From ca54c9fd96011bea280319023bd3698563898fd9 Mon Sep 17 00:00:00 2001 From: Joel Ling Date: Mon, 11 Mar 2024 13:14:42 +0900 Subject: [PATCH] implement solution described in PowerDNS#122 --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index df2c703..0e3b2d0 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -26,7 +26,7 @@ block: - name: Check if the key is already present in the DNSdist configuration file ansible.builtin.shell: | - set -o pipefail && fgrep setKey "{{ default_dnsdist_config_location }}" | sed 's/setKey("\(.*\)")/\1/' + set -o pipefail && grep '^\s*setKey' "{{ default_dnsdist_config_location }}" | sed 's/.*setKey("\(.*\)").*/\1/' register: dnsdist_grepkey_cmd changed_when: false failed_when: false