Due to network architecture, I have a need to check if the remote host I am running an Ansible play against is able to resolve specific internal URLs. The Ansible server and the remote host use different DNS servers (remote host using an internal DNS server), so I need to make sure that the URLs resolve there.
I have looked at using a lookup such as:
- name: Simple A record (IPV4 address) lookup for example.com
debug: msg="{{ lookup('dig', 'example.com.')}}"
delegate_to: < remote server>
but the documentation states that the host running the looking will require dnspython library, which I will not have on the remote host.
So besides doing something though shell or command modules and registering the stdout. Is there a better way to accomplish this task?