Skip to content

Commit

Permalink
add reload action
Browse files Browse the repository at this point in the history
  • Loading branch information
superstes committed Oct 6, 2024
1 parent e055e3c commit 238b668
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/modules/2_reload.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Definition
:header: "Parameter", "Type", "Required", "Default", "Aliases", "Comment"
:widths: 15 10 10 10 10 45

"target","string","true","\-","tgt, t","What part of the running config should be reloaded. One of: 'alias', 'rule', 'route', 'cron', 'unbound', 'syslog', 'ipsec', 'ipsec_legacy', 'shaper', 'monit', 'wireguard', 'interface_vlan', 'interface_vxlan', 'interface_vip', 'frr', 'webproxy', 'bind', 'ids'"
"target","string","true","\-","tgt, t","What part of the running config should be reloaded. One of: 'alias', 'rule', 'route', 'cron', 'unbound', 'syslog', 'ipsec', 'ipsec_legacy', 'shaper', 'monit', 'wireguard', 'interface_vlan', 'interface_vxlan', 'interface_vip', 'frr', 'webproxy', 'bind', 'ids', 'dhcrelay'"

.. include:: ../_include/param_basic.rst

Expand Down
5 changes: 5 additions & 0 deletions plugins/modules/reload.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def run_module():
'bind',
'ids',
'openvpn',
'dhcrelay',
],
description='What part of the running config should be reloaded'
),
Expand Down Expand Up @@ -152,6 +153,10 @@ def run_module():
from ansible_collections.ansibleguy.opnsense.plugins.module_utils.main.openvpn_client import \
Client as Target_Obj

elif target == 'dhcrelay':
from ansible_collections.ansibleguy.opnsense.plugins.module_utils.main.dhcrelay_relay import \
DhcRelayRelay as Target_Obj

except MODULE_EXCEPTIONS:
module_dependency_error()

Expand Down
1 change: 1 addition & 0 deletions tests/reload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@
- 'bind'
- 'ids'
- 'openvpn'
- 'dhcrelay'
# - 'gateway' # issue 88

0 comments on commit 238b668

Please sign in to comment.