# Removing DNS records using community.general.ipa\_dnsrecord

**URL:** <https://forum.ansible.com/t/removing-dns-records-using-community-general-ipa-dnsrecord/35802>\
**Category:** Ansible Project\
**Created:** [September 29, 2021, 6:37pm UTC](https://forum.ansible.com/t/removing-dns-records-using-community-general-ipa-dnsrecord/35802 "2021-09-29T18:37:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![harry\_devine](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/harry_devine/32/5293_2.png) [@harry\_devine](https://forum.ansible.com/u/harry_devine)\
**Post date:** [September 29, 2021, 6:37pm UTC](https://forum.ansible.com/t/removing-dns-records-using-community-general-ipa-dnsrecord/35802/1 "2021-09-29T18:37:06Z")

</div>

Does anyone have any experience or knowledge of the community.general.ipa\_dnsrecord module? I’m trying to use it to remove DNS records, but when the play runs, all I get are green “ok” for each host, indicating that the records are already gone, but the are not. They are still there and remain there. Here’s what I’m trying to do:

- name: Remove DNS ‘A’ Record for zone  
community.general.ipa\_dnsrecord:  
name: “{{ ansible\_fqdn }}”  
record\_type: ‘A’  
record\_value: “{{ ansible\_default\_ipv4.address }}”  
zone\_name: [example.com](http://example.com)  
state: absent  
ipa\_host: ipaserver  
ipa\_user: admin  
ipa\_pass: “{{ secure\_pass }}”

Any ideas on why the “absent” would not be removing those records?

Thanks,  
Harry

---

<div class="post-metadata">

**Author:** ![Gildas\_Cotomale](https://avatars.discourse-cdn.com/v4/letter/g/838e76/32.png) [@Gildas\_Cotomale](https://forum.ansible.com/u/Gildas_Cotomale)\
**Post date:** [October 8, 2021, 5:45am UTC](https://forum.ansible.com/t/removing-dns-records-using-community-general-ipa-dnsrecord/35802/2 "2021-10-08T05:45:44Z")

</div>

Hi Harry,

If the task is green, it means the change is successfuly issued and there was no error back and the check responded fine.

How do you check by your side ? You have to connect to the “ipaserver” and do the check locally as “admin” If yu’re diging another server, you may be reading cache value (and in fact you have to wait for complete propagation for the state to be reflected worldwide…)

Regards
