community.dns.wait_for_txt module – Wait for TXT entries to be available on all authoritative nameservers
Note
This module is part of the community.dns collection (version 3.1.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.dns
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.dns.wait_for_txt
.
New in community.dns 0.1.0
Synopsis
Wait for TXT entries with specific values to show up on all authoritative nameservers for the DNS name.
Requirements
The below requirements are needed on the host that executes this module.
dnspython >= 1.15.0 (maybe older versions also work)
Parameters
Parameter |
Comments |
---|---|
When set to When set to Choices:
|
|
Maximal amount of seconds to sleep between two rounds of probing the TXT records. Default: |
|
Number of retries for DNS query timeouts. Default: |
|
Timeout per DNS query in seconds. Default: |
|
A list of DNS names with TXT entries to look out for. |
|
Comparison modes for the values in If If If If If Choices:
|
|
A DNS name, like |
|
The TXT values to look for. |
|
The DNS server(s) to use to look up the result. Must be a list of one or more IP addresses. By default, the system’s standard resolver is used. |
|
How often to retry on SERVFAIL errors. Default: |
|
Global timeout for waiting for all records in seconds. If not set, will wait indefinitely. |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full added in community.dns 2.4.0 This action does not modify state. |
Can run in |
|
Support: N/A This action does not modify state. |
Will return details on what has changed (or possibly needs changing in |
Examples
- name: Wait for a TXT entry to appear
community.dns.wait_for_txt:
records:
# We want that www.example.com has a single TXT record with value 'Hello world!'.
# There should not be any other TXT record for www.example.com.
- name: www.example.com
values: "Hello world!"
mode: equals
# We want that example.com has a specific SPF record set.
# We do not care about other TXT records.
- name: www.example.com
values: "v=spf1 a mx -all"
mode: subset
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
How many of the checks were completed. Returned: always Sample: |
|
Results on the TXT records queried. The entries are in a 1:1 correspondence to the entries of the Returned: always Sample: |
|
How often the TXT records for this DNS name were checked. Returned: always Sample: |
|
Whether the check completed. Returned: always Sample: |
|
The DNS name this check is for. Returned: always Sample: |
|
For every authoritative nameserver for the DNS name, lists the TXT records retrieved during the last lookup made. Once the check completed for all TXT records retrieved, the TXT records for this DNS name are no longer checked. If these are multiple TXT entries for a nameserver, the order is as it was received from that nameserver. This might not be the same order provided in the check. Returned: lookup was done at least once Sample: |
Authors
Felix Fontein (@felixfontein)