show regex

This commit is contained in:
Antonio J. Delgado 2023-09-18 20:11:56 +03:00
parent 1fe09ab2c0
commit b46b683477

View file

@ -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