From 34aa317bb6a367951ebfd50c978924482dc090ef Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Mon, 18 Sep 2023 20:17:18 +0300 Subject: [PATCH] escape quotes --- tasks/configure_ovh.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tasks/configure_ovh.yml b/tasks/configure_ovh.yml index 9bc9c78..fca61cc 100644 --- a/tasks/configure_ovh.yml +++ b/tasks/configure_ovh.yml @@ -7,8 +7,11 @@ - name: Show key files debug: - msg: "{{ item['content'] | b64decode | regex_replace('^.*\"(.*)\".*$', '\\1') }}" + msg: "{{ item['content'] | b64decode | regex_replace('^.*\\\"(.*)\\\".*$', '\\1') }}" loop: "{{ key_file['results'] }}" + when: + - "'.local' not in item['item']" + - item['item'] | regex_findall('\.') | length == 1 - name: Add DKIM key record for domain synthesio.ovh.domain: @@ -17,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') }}" record_type: "DKIM" name: '_domainkey' record_ttl: 10