Fix bug for setting ec2 tags

reviewable/pr18780/r1
Harrison Gu 11 years ago
parent 4e56510fab
commit e31927a03e

@ -181,8 +181,8 @@ def main():
tagdict[tag.name] = tag.value tagdict[tag.name] = tag.value
if state == 'present': if state == 'present':
if set(tags) == set(tagdict): if set(tags).issubset(set(tagdict)):
module.exit_json(msg="Tags already match for %s." %resource, changed=False) module.exit_json(msg="Tags already exists in %s." %resource, changed=False)
else: else:
for (key, value) in set(tags.items()): for (key, value) in set(tags.items()):
if (key, value) not in set(tagdict.items()): if (key, value) not in set(tagdict.items()):

Loading…
Cancel
Save