ansible-freeipa
ansible-freeipa copied to clipboard
Get the value for current DNS record or check if DNS record exists
Hi
In my playbook, I have a scenario where I should get the value of a DNS record or check if a record exists or not then do different tasks, I have already seen the dnsrecord
folder but all samples are just about ensuring whether a record is present or absent
There is currently no support to retrieve DNS records using ansible-freeipa.
You can try to run a shell script to execute dnsrecord-find (see a similar example in tests/dnszone/test_dnszone_mod.yml), or to run something like dig
or nslookup
, or you can try running the task with check_mode: yes
(this will require #478).
I would recommend to use the either command or the dig
filter, if your control node uses the same DNS as your server.
I miss this functionality too.