mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Fixes ipv6 and defaults errors (#48776)
This commit is contained in:
parent
01b06dd5f2
commit
2cd4224fb3
2 changed files with 16 additions and 8 deletions
|
@ -94,12 +94,12 @@ def is_valid_ip_interface(address):
|
|||
|
||||
|
||||
def get_netmask(address):
|
||||
addr = ip_network(address)
|
||||
addr = ip_network(u'{0}'.format(address))
|
||||
netmask = addr.netmask.compressed
|
||||
return netmask
|
||||
|
||||
|
||||
def compress_address(address):
|
||||
addr = ip_network(address)
|
||||
addr = ip_network(u'{0}'.format(address))
|
||||
result = addr.compressed.split('/')[0]
|
||||
return result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue