File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -601,6 +601,8 @@ def get_valid_desired_states(resource_name):
601601 desired_states .add ("switched" )
602602 if "unset" in supported_operations :
603603 desired_states .add ("unset" )
604+ if "Install" in supported_operations or "install" in supported_operations :
605+ desired_states .add ("installed" )
604606 return desired_states
605607
606608
Original file line number Diff line number Diff line change @@ -365,6 +365,14 @@ def is_resource_identical(self):
365365
366366 return (False , None ) if diff_list else (True , None )
367367
368+ @trace
369+ def install (self ):
370+ ok , err = create_resource (
371+ self .client , self .resource_name , self .resource_module_params
372+ )
373+ if not ok :
374+ self .return_failure (err )
375+
368376 @trace
369377 def create_or_update (self ):
370378 self .update_diff_list (
@@ -957,6 +965,9 @@ def main(self):
957965 if "bindings" in NITRO_RESOURCE_MAP [self .resource_name ].keys ():
958966 self .sync_all_bindings ()
959967
968+ elif self .resource_name == "install" and self .module .params ["state" ] == "installed" :
969+ self .install ()
970+
960971 elif self .module .params ["state" ] in {
961972 "created" ,
962973 "imported" ,
Original file line number Diff line number Diff line change 1919DOCUMENTATION = r"""
2020---
2121module: install
22- short_description: Configuration for 0 resource.
23- description: Configuration for 0 resource.
22+ short_description: Configuration for install resource.
23+ description: Configuration for install resource.
2424version_added: 2.0.0
2525author:
2626 - Sumanth Lingappa (@sumanth-lingappa)
2727 - Shiva Shankar Vaddepally (@shivashankar-vaddepally)
2828options:
2929 state:
30- choices: []
30+ choices:
31+ - installed
3132 default: present
3233 description:
3334 - The state of the resource being configured by the module on the NetScaler
3435 ADC node.
36+ - When C(Install), the resource will be installed on the NetScaler ADC node.
3537 type: str
3638 async:
3739 type: bool
You can’t perform that action at this time.
0 commit comments