ansible-freeipa icon indicating copy to clipboard operation
ansible-freeipa copied to clipboard

Get the value for current DNS record or check if DNS record exists

Open yasharne opened this issue 4 years ago • 2 comments

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

yasharne avatar Jan 05 '21 08:01 yasharne

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).

rjeffman avatar Jan 05 '21 19:01 rjeffman

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.

itcultus avatar Apr 01 '21 13:04 itcultus