1
0
Fork 0
mirror of https://github.com/ansible-collections/hetzner.hcloud.git synced 2026-02-04 16:11:49 +00:00
hetzner.hcloud/plugins/module_utils/ipaddress.py
Jonas L. 907a7fd73c
fix: firewall idempotency with ipv6 addresses (#722)
##### SUMMARY

Always use the canonical address representation when checking if rules
changed.


Fixes #708
2025-10-31 14:45:06 +01:00

7 lines
146 B
Python

from __future__ import annotations
from ipaddress import ip_interface
def normalize_ip(value: str) -> str:
return str(ip_interface(value))