ec2_group allow empty rules.
This commit is contained in:
parent
adec837306
commit
5e694c490c
1 changed files with 8 additions and 4 deletions
|
@ -24,11 +24,15 @@ options:
|
|||
required: false
|
||||
rules:
|
||||
description:
|
||||
- List of firewall inbound rules to enforce in this group (see example).
|
||||
- List of firewall inbound rules to enforce in this group (see'''
|
||||
''' example). If none are supplied, a default all-out rule is assumed.'''
|
||||
''' If an empty list is supplied, no inbound rules will be enabled.
|
||||
required: false
|
||||
rules_egress:
|
||||
description:
|
||||
- List of firewall outbound rules to enforce in this group (see example).
|
||||
- List of firewall outbound rules to enforce in this group (see'''
|
||||
''' example). If none are supplied, a default all-out rule is assumed.'''
|
||||
''' If an empty list is supplied, no outbound rules will be enabled.
|
||||
required: false
|
||||
version_added: "1.6"
|
||||
region:
|
||||
|
@ -268,7 +272,7 @@ def main():
|
|||
addRulesToLookup(group.rules, 'in', groupRules)
|
||||
|
||||
# Now, go through all provided rules and ensure they are there.
|
||||
if rules:
|
||||
if rules is not None:
|
||||
for rule in rules:
|
||||
group_id, ip, target_group_created = get_target_from_rule(module, ec2, rule, name, group, groups, vpc_id)
|
||||
if target_group_created:
|
||||
|
@ -309,7 +313,7 @@ def main():
|
|||
addRulesToLookup(group.rules_egress, 'out', groupRules)
|
||||
|
||||
# Now, go through all provided rules and ensure they are there.
|
||||
if rules_egress:
|
||||
if rules_egress is not None:
|
||||
for rule in rules_egress:
|
||||
group_id, ip, target_group_created = get_target_from_rule(module, ec2, rule, name, group, groups, vpc_id)
|
||||
if target_group_created:
|
||||
|
|
Loading…
Reference in a new issue