Господа, реально-ли сделать такое? Или я желаю странного?
##note: ansible has a dnstxt module, that works with lookup, like lookup('dnstxt', 'domain')
# but there is a bug/feature that the record is cached and the cache is never updated
# https://github.com/ansible/ansible/issues/44128
- name: Check that TXT record is available
when: not ansible_check_mode
become: false
delegate_to: localhost
command: "dig {{ __ssl_regru_dns_subdomain_full }} TXT +short @{{ ssl_regru_dns_server }}" # yamllint disable-line
register: __ssl_regru_dns_check_txt_record
until: (__ssl_regru_dns_check_txt_record.stdout | replace('\"', '')) == __ssl_regru_dns_challenge_content # yamllint disable-line
retries: "{{ ssl_regru_dns_retries }}"
delay: "{{ ssl_regru_dns_delay }}"
changed_when: false
run_once: true