Open tabacha opened 4 years ago
Files identified in the description:
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
cc @keachi click here for bot help
hi @tabacha thanks for reporting this (quite a while ago!).
I took a quick glance at the code, and it seems that in both cases:
This is coming straight from the univention python library. When running a state=present
on an existing value, there is this obj
object, and everything happen within it:
https://github.com/ansible-collections/community.general/blob/main/plugins/modules/cloud/univention/udm_dns_record.py#L196-L207
However, that object comes from: https://github.com/ansible-collections/community.general/blob/main/plugins/module_utils/univention_umc.py#L227 which by its turn comes from: https://github.com/ansible-collections/community.general/blob/main/plugins/module_utils/univention_umc.py#L193
So, I would suggest:
We'll be happy to keep this ticket open until the issue is solved, but this does not look like something that will be solved here without adding an extra layer of complexity in the module, which is undesirable.
Cheers
Hi I have updaded ansible via pip3 as root
pip3 list |grep ansible
ansible 4.5.0
ansible-core 2.11.5
and installed community.general witth
ansible-galaxy collection install community.general
( community.general:3.6.0)
The bug exists, see example playbook and output, attached to the issue test-playbook-and-output.zip
I have looked in the code I think the problem is located here:
The univention library is not calculating any changes/diff. This is done by the communtiy.gerneral collection.
I have looked in the code I think the problem is located here:
The univention library is not calculating any changes/diff. This is done by the communtiy.gerneral collection.
I wrote bullshit. The code for the diff is here: https://github.com/univention/univention-corporate-server/blob/5.0-0/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py#L253
Probably fixing that requires to normalize IP addresses when comparing. Using the ipaddress
library for this (part of the standard Python library since Python 3.3, and backports available on Pypi for Python 2) is probably the best solution. From what you wrote, this needs to be fixed on Univention's side though.
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.
SUMMARY
If you try to set a ipv6 host_record with an shortend IPv6 adddress the udm_dns_record it will always report a change.
ISSUE TYPE
COMPONENT NAME
plugins/modules/cloud/univention/udm_dns_record.py
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Debian 10
STEPS TO REPRODUCE
Plese note: if you change: 2001:0db8 :: 42 to 2001:0db8:0000:0000:0000:0000:0000:0042 no change will be reported.
EXPECTED RESULTS
If you call this task twice, there should be no change reported by ansible
ACTUAL RESULTS
Change will be reported, every time.