From b5500d9a4dc6cdfc3f1a385befe40d3184ea2215 Mon Sep 17 00:00:00 2001 From: Harrison Gu Date: Sat, 12 Oct 2013 20:57:32 +0800 Subject: [PATCH] Fix bug for setting ec2 tags --- library/cloud/ec2_tag | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/cloud/ec2_tag b/library/cloud/ec2_tag index 1dfa74a79c..5e8d925055 100644 --- a/library/cloud/ec2_tag +++ b/library/cloud/ec2_tag @@ -181,8 +181,8 @@ def main(): tagdict[tag.name] = tag.value if state == 'present': - if set(tags) == set(tagdict): - module.exit_json(msg="Tags already match for %s." %resource, changed=False) + if set(tags).issubset(set(tagdict)): + module.exit_json(msg="Tags already exists in %s." %resource, changed=False) else: for (key, value) in set(tags.items()): if (key, value) not in set(tagdict.items()):