Hi!
I want to wait for some DNS record registered in DNS server. For example, A
record. So I try to use this task:
- name: Wait DNS A record host.example.com registered
set_fact:
lookup_result: "{{ lookup('dig', 'host.example.com.') }}"
until: lookup_result != 'NXDOMAIN'
retries: 20
delay: 3
But looks like lookup runs only single time at start and never again. I
checked it with tcpdump:
$ sudo tcpdump udp port 53
Only single request/response on first loop iteration.
So, looks like lookup_result setted to value 'NXDOMAIN' and this value
checked with effectively "until: 'NXDOMAIN' != 'NXDOMAIN'" 20 times without
success.
How can I force run lookup on every loop iteration?
Ansible version 2.6.5
Thanks.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/2ad1ad66-57d4-4029-8aac-e067205e3d2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.