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 @@ -364,7 +364,13 @@ def is_resource_identical(self):
364364 return (False , immutable_resource_module_params )
365365
366366 return (False , None ) if diff_list else (True , None )
367-
367+ @trace
368+ def install (self ):
369+ ok , err = create_resource (
370+ self .client , self .resource_name , self .resource_module_params
371+ )
372+ if not ok :
373+ self .return_failure (err )
368374 @trace
369375 def create_or_update (self ):
370376 self .update_diff_list (
@@ -957,6 +963,9 @@ def main(self):
957963 if "bindings" in NITRO_RESOURCE_MAP [self .resource_name ].keys ():
958964 self .sync_all_bindings ()
959965
966+ elif self .resource_name == "install" and self .module .params ["state" ] == "installed" :
967+ self .install ()
968+
960969 elif self .module .params ["state" ] in {
961970 "created" ,
962971 "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