From a5a9c92fcdc8ebf7068982abc23de2ee8ce05aa5 Mon Sep 17 00:00:00 2001 From: whiter Date: Thu, 2 Jul 2015 15:24:39 +1000 Subject: [PATCH] Fixed dicts comparison for tags --- lib/ansible/modules/cloud/amazon/ec2_vpc_net.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/amazon/ec2_vpc_net.py b/lib/ansible/modules/cloud/amazon/ec2_vpc_net.py index 41186ed0ab..ebdd4ed650 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_vpc_net.py +++ b/lib/ansible/modules/cloud/amazon/ec2_vpc_net.py @@ -145,7 +145,7 @@ def update_vpc_tags(vpc, module, vpc_obj, tags, name): tags.update({'Name': name}) try: current_tags = dict((t.name, t.value) for t in vpc.get_all_tags(filters={'resource-id': vpc_obj.id})) - if sorted(current_tags) != sorted(tags): + if cmp(tags, current_tags): vpc.create_tags(vpc_obj.id, tags) return True else: