ansible-collections / community.general

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

community.general.netcup_dns module - Doesn't delete A/AAAA records when setting a CNAME record and vice versa #5031

Open PascalReintjens opened 2 years ago

PascalReintjens commented 2 years ago

Summary

When you are setting a CNAME record for a sub(-domain) it should remove all other types of records for this sub(-domain). If you set an A/AAAA record etc. for a sub(-domain) it should remove the CNAME record.

This module seems to ignore those conflicts and the netcup api accepts that nonetheless, resulting if the sub(-domain) had one type of record(s) and gets "switched" to the other type in a broken domain configuration state.

Issue Type

Bug Report

Component Name

community.general.netcup_dns

Ansible Version

ansible [core 2.12.7]
  config file = /mnt/c/Users/Pascal/Pascal - Cloud/Privat/Resourcen/Ansible/REI/Ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /mnt/c/Users/Pascal/Pascal - Cloud/Privat/Resourcen/Ansible/REI/Ansible/.galaxy/collections
  executable location = /usr/bin/ansible
  python version = 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]
  jinja version = 2.10.1
  libyaml = True

Community.general Version

# /usr/lib/python3/dist-packages/ansible_collections
Collection        Version
----------------- -------
community.general 4.8.3
root@Pascal-Hauptpc:/mnt/c/Users/Pascal/Pascal - Cloud/Privat/Resourcen/Ansible/REI/Ansible#

Configuration

OS / Environment

Ubuntu 20.04.4 LTS (WSL 2)

Steps to Reproduce

Give a domain, for example subdomain.domainname.de a CNAME record. Then try to set an A record for subdomain.domainname.de via this module. Then both show up in the netcup domain interface,

or

Give a domain, for example subdomain.domainname.de an A record. Then try to set an CNAME record for subdomain.domainname.de via this module. Then both show up in the netcup domain interface,

Expected Results

I expected the offending CNAME / A/AAAA (depending what is currently being set) to be removed

Actual Results

The offending CNAME / A/AAAA is still there, resulting in a broken domain-state

Code of Conduct

ansibullbot commented 2 years 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 2 years ago

cc @nbuchwitz click here for bot help

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