From cc6b770bbf24db3944529ff5cfa47fd40ea69494 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Mon, 18 Sep 2023 20:31:03 +0300 Subject: [PATCH] fix regex --- tasks/configure_ovh.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/configure_ovh.yml b/tasks/configure_ovh.yml index fca61cc..8f9e702 100644 --- a/tasks/configure_ovh.yml +++ b/tasks/configure_ovh.yml @@ -7,7 +7,7 @@ - name: Show key files debug: - msg: "{{ item['content'] | b64decode | regex_replace('^.*\\\"(.*)\\\".*$', '\\1') }}" + msg: "{{ item['content'] | b64decode | regex_replace('^.*\\\"(.*)\\\".*$', '\\1', multiline=True) | regex_replace('[\\s\\n\\t\\\"]*', '', multiline=True)}}" loop: "{{ key_file['results'] }}" when: - "'.local' not in item['item']" @@ -20,7 +20,7 @@ application_secret: "{{ ovh_application_secret }}" consumer_key: "{{ ovh_consumer_key }}" domain: "{{ item['item'] }}" - value: "{{ item['content'] | b64decode | regex_replace('^.*\\\"(.*)\\\".*$', '\\1') }}" + value: "{{ item['content'] | b64decode | regex_replace('^.*\\\"(.*)\\\".*$', '\\1', multiline=True) }}" record_type: "DKIM" name: '_domainkey' record_ttl: 10