1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Added missing else statement that caused existing rules to be discarded

This commit is contained in:
Rob 2015-12-04 01:50:38 +00:00 committed by Matt Clay
parent caea50ba4d
commit 103be7ab51

View file

@ -223,6 +223,8 @@ def create_lifecycle_rule(connection, module):
lifecycle_obj.append(rule)
changed = True
appended = True
else:
lifecycle_obj.append(existing_rule)
# If nothing appended then append now as the rule must not exist
if not appended:
lifecycle_obj.append(rule)