Skip to content

Commit

Permalink
[pfsense_interface_group] members only required on creation
Browse files Browse the repository at this point in the history
  • Loading branch information
opoplawski committed Jan 4, 2024
1 parent 8c58284 commit b9dd668
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/module_utils/interface_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@
state=dict(default='present', choices=['present', 'absent']),
name=dict(required=True, type='str'),
descr=dict(type='str'),
members=dict(required=True, type='list', elements='str'),
members=dict(type='list', elements='str'),
)

INTERFACE_GROUP_REQUIRED_IF = [
['state', 'present', ['members']],
]

INTERFACE_GROUP_PHP_COMMAND = '''
require_once("interfaces.inc");
{0}
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/pfsense_interface_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
def main():
module = AnsibleModule(
argument_spec=INTERFACE_GROUP_ARGUMENT_SPEC,
required_if=INTERFACE_GROUP_REQUIRED_IF,
supports_check_mode=True)

pfmodule = PFSenseInterfaceGroupModule(module)
Expand Down

0 comments on commit b9dd668

Please sign in to comment.