Removing DNS records using community.general.ipa_dnsrecord

60 views
Skip to first unread message

lift...@gmail.com

unread,
Sep 29, 2021, 2:37:06 PM9/29/21
to Ansible Project
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
     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

Gildas Cotomale

unread,
Oct 8, 2021, 1:45:44 AM10/8/21
to Ansible Project
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


Reply all
Reply to author
Forward
0 new messages