Basic nslookup functionality

Hi,

In my inventory file I have the following content, e.g.

[subnets]
8.8.4.4
8.8.8.8

Now in the playbook I want to resolve DNS for this IP and save it back into another file (that will be used as input for another playbook).
So I started with the following (introduced extra fact to keep it simple, not sure if this is correct approach):

It might be possible for you to use the dig lookup plugin to get information from dns. Seehttps://docs.ansible.com/ansible/devel/plugins/lookup/dig.html

Hope this helps,

Jon