From 2532bfe6b9d0b63f327bbdcaad49b3a8d9c4eb96 Mon Sep 17 00:00:00 2001 From: Nicolas Boutet Date: Mon, 8 Feb 2021 17:05:41 +0100 Subject: [PATCH] Remove dependency on netcommon collection --- plugins/modules/ec2_vpc_nacl.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/modules/ec2_vpc_nacl.py b/plugins/modules/ec2_vpc_nacl.py index 20ff0d45019..da053f55a46 100644 --- a/plugins/modules/ec2_vpc_nacl.py +++ b/plugins/modules/ec2_vpc_nacl.py @@ -161,11 +161,8 @@ except ImportError: pass # Handled by AnsibleAWSModule -from ansible.module_utils._text import to_text from ansible_collections.amazon.aws.plugins.module_utils.core import AnsibleAWSModule from ansible_collections.amazon.aws.plugins.module_utils.ec2 import AWSRetry -from ansible_collections.ansible.netcommon.plugins.module_utils.compat.ipaddress import IPv6Network -from ansible_collections.ansible.netcommon.plugins.module_utils.compat.ipaddress import ip_network # VPC-supported IANA protocol numbers # http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml @@ -298,7 +295,7 @@ def rules_changed(aws_rules, param_rules, Egress, nacl_id, client, module): def is_ipv6(cidr): - return isinstance(ip_network(to_text(cidr)), IPv6Network) + return ':' in cidr def process_rule_entry(entry, Egress):