From b46b683477143e95f3dc17fdd800e96bcf5e7a5b Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Mon, 18 Sep 2023 20:11:56 +0300 Subject: [PATCH] show regex --- tasks/configure_ovh.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tasks/configure_ovh.yml b/tasks/configure_ovh.yml index cb79dd0..9bc9c78 100644 --- a/tasks/configure_ovh.yml +++ b/tasks/configure_ovh.yml @@ -5,9 +5,10 @@ register: key_file loop: "{{ mail_domains }}" -# - name: Show key files -# debug: -# var: key_file +- name: Show key files + debug: + msg: "{{ item['content'] | b64decode | regex_replace('^.*\"(.*)\".*$', '\\1') }}" + loop: "{{ key_file['results'] }}" - name: Add DKIM key record for domain synthesio.ovh.domain: @@ -16,7 +17,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