ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
811 stars 1.49k forks source link

gandi_livedns: No method to delete records by name (regardless of type) #7008

Open rc5hack opened 1 year ago

rc5hack commented 1 year ago

Summary

Currently the only supported way to delete DNS records with gandi_livedns plugin is to delete them at name+type basis. Code below will delete foo.domain.tld record with type A (if any), implementing Delete record with {rrset_name} and {rrset_type} method of Gandi API:

- name: Delete DNS records
  community.general.gandi_livedns:
    domain: 'domain.tld'
    record: 'foo'
    type: 'A'
    api_key: 'dummy'
    state: 'absent'
  register: record

In fact there is another method in Gandi API which allows to delete record at name basis, regardless of type, which is usable in some cases: Delete all records named {rrset_name}. E.g. I don't know if there are A, AAAA or CNAME foo.domain.tld record(s), but I want just delete all records with name foo.

So I'm asking to add into gandi_livedns plugin option to call Delete all records named {rrset_name} API method.

Issue Type

Feature Idea

Component Name

gandi_livedns

Additional Information

No response

Code of Conduct

ansibullbot commented 1 year ago

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot commented 1 year ago

cc @gthiemonge click here for bot help