Skip to content

Commit c3df64f

Browse files
author
Shiva Shankar Vaddepally
committed
Merge branch 'main' of github.com:netscaler/ansible-collection-netscaleradc into NSNETAUTO-1056_updateSsl
2 parents 4ec200a + e5df82f commit c3df64f

5 files changed

Lines changed: 16 additions & 2 deletions

File tree

examples/reboot.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
- name: Reboot a system
3+
hosts: localhost
4+
gather_facts: false
5+
tasks:
6+
- name: Reboot the NetScaler ADC node
7+
delegate_to: localhost
8+
netscaler.adc.reboot:
9+
state: rebooted

plugins/module_utils/common.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,8 @@ def get_valid_desired_states(resource_name):
665665
desired_states.add("applied")
666666
if "change" in supported_operations:
667667
desired_states.add("changed")
668+
if "reboot" in supported_operations:
669+
desired_states.add("rebooted")
668670
return desired_states
669671

670672

plugins/module_utils/module_executor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,7 @@ def main(self):
11981198
"unset",
11991199
"renamed",
12001200
"applied",
1201+
"rebooted",
12011202
"changed",
12021203
}:
12031204
state_action_map = {
@@ -1208,6 +1209,7 @@ def main(self):
12081209
"unset": "unset",
12091210
"renamed": "rename",
12101211
"applied": "apply",
1212+
"rebooted": "reboot",
12111213
"changed": "update",
12121214
}
12131215
self.act_on_resource(

plugins/module_utils/nitro_resource_map.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50050,7 +50050,7 @@
5005050050
"update_payload_keys": ["name", "psk", "rdpip", "rdpport", "rdpredirection"],
5005150051
},
5005250052
"reboot": {
50053-
"_supported_operations": ["Reboot"],
50053+
"_supported_operations": ["reboot"],
5005450054
"action_payload_keys": {
5005550055
"apply": [],
5005650056
"change": [],

plugins/modules/reboot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
- Shiva Shankar Vaddepally (@shivashankar-vaddepally)
2828
options:
2929
state:
30-
choices: []
30+
choices:
31+
- rebooted
3132
default: present
3233
description:
3334
- The state of the resource being configured by the module on the NetScaler

0 commit comments

Comments
 (0)