Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions examples/reboot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
- name: Reboot a system
hosts: localhost
gather_facts: false
tasks:
- name: Reboot the NetScaler ADC node
delegate_to: localhost
netscaler.adc.reboot:
state: rebooted
2 changes: 2 additions & 0 deletions plugins/module_utils/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,8 @@ def get_valid_desired_states(resource_name):
desired_states.add("renamed")
if "apply" in supported_operations:
desired_states.add("applied")
if "reboot" in supported_operations:
desired_states.add("rebooted")
return desired_states


Expand Down
2 changes: 2 additions & 0 deletions plugins/module_utils/module_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,7 @@ def main(self):
"unset",
"renamed",
"applied",
"rebooted",
}:
state_action_map = {
"created": "create",
Expand All @@ -1207,6 +1208,7 @@ def main(self):
"unset": "unset",
"renamed": "rename",
"applied": "apply",
"rebooted": "reboot",
}
self.act_on_resource(
action=state_action_map[self.module.params["state"]]
Expand Down
2 changes: 1 addition & 1 deletion plugins/module_utils/nitro_resource_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -48706,7 +48706,7 @@
"update_payload_keys": ["name", "psk", "rdpip", "rdpport", "rdpredirection"],
},
"reboot": {
"_supported_operations": ["Reboot"],
"_supported_operations": ["reboot"],
"action_payload_keys": {
"apply": [],
"create": [],
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/reboot.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
- Shiva Shankar Vaddepally (@shivashankar-vaddepally)
options:
state:
choices: []
choices:
- rebooted
default: present
description:
- The state of the resource being configured by the module on the NetScaler
Expand Down
Loading