Add additional params to get_target_from_rule method in ec2_group
Fixes #7592
This commit is contained in:
parent
acb00120b8
commit
68ef54e7e8
1 changed files with 3 additions and 3 deletions
|
@ -106,7 +106,7 @@ def addRulesToLookup(rules, prefix, dict):
|
||||||
grant.group_id, grant.cidr_ip)] = rule
|
grant.group_id, grant.cidr_ip)] = rule
|
||||||
|
|
||||||
|
|
||||||
def get_target_from_rule(rule, name, groups):
|
def get_target_from_rule(module, rule, name, group, groups):
|
||||||
"""
|
"""
|
||||||
Returns tuple of (group_id, ip) after validating rule params.
|
Returns tuple of (group_id, ip) after validating rule params.
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ def main():
|
||||||
# Now, go through all provided rules and ensure they are there.
|
# Now, go through all provided rules and ensure they are there.
|
||||||
if rules:
|
if rules:
|
||||||
for rule in rules:
|
for rule in rules:
|
||||||
group_id, ip, target_group_created = get_target_from_rule(rule, name, groups)
|
group_id, ip, target_group_created = get_target_from_rule(module, rule, name, group, groups)
|
||||||
if target_group_created:
|
if target_group_created:
|
||||||
changed = True
|
changed = True
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ def main():
|
||||||
# Now, go through all provided rules and ensure they are there.
|
# Now, go through all provided rules and ensure they are there.
|
||||||
if rules_egress:
|
if rules_egress:
|
||||||
for rule in rules_egress:
|
for rule in rules_egress:
|
||||||
group_id, ip, target_group_created = get_target_from_rule(rule, name, groups)
|
group_id, ip, target_group_created = get_target_from_rule(module, rule, name, group, groups)
|
||||||
if target_group_created:
|
if target_group_created:
|
||||||
changed = True
|
changed = True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue