diff --git a/plugins/module_utils/common.py b/plugins/module_utils/common.py index 63f6e70f4..a64bd0c83 100644 --- a/plugins/module_utils/common.py +++ b/plugins/module_utils/common.py @@ -619,6 +619,8 @@ def get_valid_desired_states(resource_name): desired_states.add("switched") if "unset" in supported_operations: desired_states.add("unset") + if "Install" in supported_operations or "install" in supported_operations: + desired_states.add("installed") if "rename" in supported_operations: desired_states.add("renamed") if "apply" in supported_operations: diff --git a/plugins/module_utils/module_executor.py b/plugins/module_utils/module_executor.py index f697cc996..5e7d59f4e 100644 --- a/plugins/module_utils/module_executor.py +++ b/plugins/module_utils/module_executor.py @@ -372,6 +372,14 @@ def is_resource_identical(self): return (False, None) if diff_list else (True, None) + @trace + def install(self): + ok, err = create_resource( + self.client, self.resource_name, self.resource_module_params + ) + if not ok: + self.return_failure(err) + @trace def create_or_update(self): self.update_diff_list( @@ -964,6 +972,9 @@ def main(self): if "bindings" in NITRO_RESOURCE_MAP[self.resource_name].keys(): self.sync_all_bindings() + elif self.resource_name == "install" and self.module.params["state"] == "installed": + self.install() + elif self.module.params["state"] in { "created", "imported", diff --git a/plugins/module_utils/nitro_resource_map.py b/plugins/module_utils/nitro_resource_map.py index d8e07dd34..c48c4e3a3 100644 --- a/plugins/module_utils/nitro_resource_map.py +++ b/plugins/module_utils/nitro_resource_map.py @@ -19002,6 +19002,30 @@ "singleton": False, "update_payload_keys": [], }, + "clear_config": { + "_supported_operations": ["add"], + "add_payload_keys": ["all", "mode"], + "bindings": [], + "bindprimary_key": "", + "delete_arg_keys": [], + "disable_payload_keys": [], + "enable_payload_keys": [], + "get_arg_keys": [], + "immutable_keys": [], + "primary_key": "", + "primary_key_composite": [], + "readwrite_arguments": { + "all": {"no_log": False, "required": False, "type": "bool"}, + "mode": { + "choices": ["basic", "extended+", "full"], + "no_log": False, + "required": False, + "type": "str", + }, + }, + "singleton": False, + "update_payload_keys": [], + }, "cloudallowedngsticketprofile": { "_supported_operations": [ "add", @@ -30203,6 +30227,15 @@ "create": [], "force": [], "import": [], + "install": [ + "a", + "async", + "enhancedupgrade", + "l", + "resizeswapvar", + "url", + "y", + ], "link": [], "switch": [], "unlink": [], diff --git a/plugins/modules/install.py b/plugins/modules/install.py index 055215ee3..f09417183 100644 --- a/plugins/modules/install.py +++ b/plugins/modules/install.py @@ -19,19 +19,21 @@ DOCUMENTATION = r""" --- module: install -short_description: Configuration for 0 resource. -description: Configuration for 0 resource. +short_description: Configuration for install resource. +description: Configuration for install resource. version_added: 2.0.0 author: - Sumanth Lingappa (@sumanth-lingappa) - Shiva Shankar Vaddepally (@shivashankar-vaddepally) options: state: - choices: [] + choices: + - installed default: present description: - The state of the resource being configured by the module on the NetScaler ADC node. + - When C(Install), the resource will be installed on the NetScaler ADC node. type: str async: type: bool