diff --git a/lib/ansible/modules/cloud/amazon/ec2_vpc_peer.py b/lib/ansible/modules/cloud/amazon/ec2_vpc_peer.py index 2dcde18eff8..7cb3798d1db 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_vpc_peer.py +++ b/lib/ansible/modules/cloud/amazon/ec2_vpc_peer.py @@ -238,12 +238,10 @@ def tags_changed(pcx_id, client, module): tags = [item for sublist in tag_values for item in sublist] if sorted(pcx_tags) == sorted(tags): changed = False - return changed - else: + elif tags: delete_tags(pcx_id, client, module) create_tags(pcx_id, client, module) changed = True - return changed return changed