Removing DNS records using community.general.ipa_dnsrecord

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

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