Skip to content

Commit

Permalink
[pfsense_rule] Add support for floating 'any' interface rule
Browse files Browse the repository at this point in the history
  • Loading branch information
GuideGlyph authored and opoplawski committed Jan 7, 2024
1 parent 9538d8a commit 6b5f321
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion plugins/module_utils/rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ def _parse_floating_interfaces(self, interfaces):
""" validate param interface field when floating is true """
res = []
for interface in interfaces.split(','):
res.append(self.pfsense.parse_interface(interface))
if interface == 'any':
res.append(interface)
else:
res.append(self.pfsense.parse_interface(interface))
self._floating_interfaces = interfaces
return ','.join(res)

Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/pfsense_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
default: false
type: bool
interface:
description: The interface for the rule
description: The interface for the rule. Use 'any' to apply to all interface (for floating rules only).
required: true
type: str
floating:
Expand Down

0 comments on commit 6b5f321

Please sign in to comment.