When using the netscaler.adc.ssldhparam module, creation of a DH Key fails.
My suggest is that "float" datatype is wrong for the "bits" parameter. Float adds a "." like 2048.0 which obviously fails.
TASK [netscaler_SSLPROFILE : Create SSL DH Key] ******************************************************************************************************************************************************************************************************************
fatal: [dkr_adc4 -> localhost]: FAILED! => {"changed": true, "loglines": ["DEBUG: Initializing ModuleExecutor for resource ssldhparam", "TRACE: ENTRY: common.get_valid_desired_states() called with ('ssldhparam',), {}", "TRACE: EXIT: common.get_valid_desired_states() returned {'created'}", "TRACE: ENTRY: common.get_netscaler_version() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f55f0ff2a40>,), {}", "TRACE: ENTRY: common.get_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f55f0ff2a40>, 'nsversion'), {}", "WARNING: Resource name nsversion not found in NITRO_RESOURCE_MAP to get get_arg_keys", "TRACE: ENTRY: client.get() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f55f0ff2a40>,), {'resource': 'nsversion', 'id': None, 'args': {}}", "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f55f0ff2a40>, 'nsversion'), {'id': None, 'args': {}, 'attrs': None, 'filter': None}", "TRACE: EXIT: client.url_builder() returned https://10.205.102.4/nitro/v1/config/nsversion", "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f55f0ff2a40>, 'GET', 'https://10.205.102.4/nitro/v1/config/nsversion'), {}", "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7f55f1018b50>, 'check_mode': False, 'api_path': 'nitro/v1/config', '_headers': {'Content-Type': 'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER': '********', 'X-NITRO-PASS': '********'}}", "DEBUG: fetch_url()-resonse-info= GET: {'url': 'https://10.205.102.4/nitro/v1/config/nsversion', 'status': 200, 'date': 'Mon, 08 Apr 2024 12:03:49 GMT', 'server': 'Apache', 'x-frame-options': 'SAMEORIGIN', 'expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'cache-control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'pragma': 'no-cache', 'vary': 'Accept-Encoding', 'feature-policy': \"camera 'none'; microphone 'none'; geolocation 'none'\", 'referrer-policy': 'no-referrer', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'content-length': '201', 'content-type': 'application/json; charset=utf-8', 'connection': 'close', 'cookies_string': '', 'cookies': {}, 'msg': 'OK (201 bytes)'}", "TRACE: EXIT: client.send() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'nsversion': {'installedversion': False, 'version': 'NetScaler NS14.1: Build 17.38.nc, Date: Feb 7 2024, 21:58:09 (64-bit)', 'mode': '1'}})", "TRACE: EXIT: client.get() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'nsversion': {'installedversion': False, 'version': 'NetScaler NS14.1: Build 17.38.nc, Date: Feb 7 2024, 21:58:09 (64-bit)', 'mode': '1'}})", "TRACE: ENTRY: common.fix_nitro_anomolies() called with ('nsversion', {}, [{'installedversion': False, 'version': 'NetScaler NS14.1: Build 17.38.nc, Date: Feb 7 2024, 21:58:09 (64-bit)', 'mode': '1'}]), {}", "TRACE: EXIT: common.fix_nitro_anomolies() returned [{'installedversion': False, 'version': 'NetScaler NS14.1: Build 17.38.nc, Date: Feb 7 2024, 21:58:09 (64-bit)', 'mode': '1'}]", "TRACE: EXIT: common.get_resource() returned (True, [{'installedversion': False, 'version': 'NetScaler NS14.1: Build 17.38.nc, Date: Feb 7 2024, 21:58:09 (64-bit)', 'mode': '1'}])", "TRACE: EXIT: common.get_netscaler_version() returned (14.1, 17.38)", "INFO: NetScaler version: 14.1-17.38", "DEBUG: All params (including non module-specific params) are: {'nsip': '10.205.102.4', 'nitro_user': '********', 'nitro_pass': '********', 'validate_certs': False, 'state': 'created', 'bits': 2048.0, 'dhfile': 'nsconfig/ssl/dhkey_gen2_2048', 'gen': '2', 'nitro_protocol': 'https', 'save_config': False, 'api_path': 'nitro/v1/config', 'nitro_auth_token': None}", "TRACE: ENTRY: module_executor._filter_resource_module_params() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f55f1018a30>,), {}", "DEBUG: self.module.params: {'nsip': '10.205.102.4', 'nitro_user': '********', 'nitro_pass': '********', 'validate_certs': False, 'state': 'created', 'bits': 2048.0, 'dhfile': 'nsconfig/ssl/dhkey_gen2_2048', 'gen': '2', 'nitro_protocol': 'https', 'save_config': False, 'api_path': 'nitro/v1/config', 'nitro_auth_token': None}", "DEBUG: Desired `ssldhparam` module specific params are: {'bits': 2048.0, 'dhfile': 'nsconfig/ssl/dhkey_gen2_2048', 'gen': '2'}", "TRACE: EXIT: module_executor._filter_resource_module_params() returned None", "TRACE: ENTRY: module_executor._filter_desired_bindings() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f55f1018a30>,), {}", "DEBUG: Desired `ssldhparam` module specific bindings are: {}", "TRACE: EXIT: module_executor._filter_desired_bindings() returned None", "TRACE: ENTRY: module_executor.main() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f55f1018a30>,), {}", "TRACE: ENTRY: module_executor.act_on_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f55f1018a30>,), {'action': 'create'}", "TRACE: ENTRY: common.create_resource_with_action() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f55f0ff2a40>, 'ssldhparam', {'bits': 2048.0, 'dhfile': 'nsconfig/ssl/dhkey_gen2_2048', 'gen': '2'}), {'action': 'create'}", "TRACE: ENTRY: common._check_create_resource_params() called with ('ssldhparam', {'bits': 2048.0, 'dhfile': 'nsconfig/ssl/dhkey_gen2_2048', 'gen': '2'}), {'action': 'create'}", "TRACE: EXIT: common._check_create_resource_params() returned (True, None, {'bits': 2048.0, 'dhfile': 'nsconfig/ssl/dhkey_gen2_2048', 'gen': '2'})", "TRACE: ENTRY: client.post() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f55f0ff2a40>,), {'post_data': {'ssldhparam': {'bits': 2048.0, 'dhfile': 'nsconfig/ssl/dhkey_gen2_2048', 'gen': '2'}}, 'resource': 'ssldhparam', 'action': 'create'}", "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f55f0ff2a40>, 'ssldhparam'), {'action': 'create'}", "TRACE: EXIT: client.url_builder() returned https://10.205.102.4/nitro/v1/config/ssldhparam?action=create", "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f55f0ff2a40>, 'POST', 'https://10.205.102.4/nitro/v1/config/ssldhparam?action=create', '{\"ssldhparam\": {\"bits\": 2048.0, \"dhfile\": \"nsconfig/ssl/dhkey_gen2_2048\", \"gen\": \"2\"}}'), {}", "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7f55f1018b50>, 'check_mode': False, 'api_path': 'nitro/v1/config', '_headers': {'Content-Type': 'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER': '********', 'X-NITRO-PASS': '********'}}", "DEBUG: fetch_url()-resonse-info= POST: {'url': 'https://10.205.102.4/nitro/v1/config/ssldhparam?action=create', 'status': -1, 'msg': 'Connection failure: The read operation timed out'}", "TRACE: EXIT: client.send() returned (-1, {})", "TRACE: EXIT: client.post() returned (-1, {})", "TRACE: ENTRY: common.return_response() called with (), {'status_code': -1, 'response_body': {}, 'operation': 'create_resource', 'resource_name': 'ssldhparam'}", "ERROR: create_resource FAILED; status_code: -1; Reason:{}", "TRACE: EXIT: common.return_response() returned (False, 'ERROR: create_resource FAILED; status_code: -1; Reason:{}')", "TRACE: EXIT: common.create_resource_with_action() returned (False, 'ERROR: create_resource FAILED; status_code: -1; Reason:{}')", "TRACE: ENTRY: module_executor.return_failure() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f55f1018a30>, 'ERROR: create_resource FAILED; status_code: -1; Reason:{}'), {}"], "msg": "ERROR: create_resource FAILED; status_code: -1; Reason:{}"}
My suggest is that "float" datatype is wrong for the "bits" parameter. Float adds a "." like 2048.0 which obviously fails.
Summary
When using the netscaler.adc.ssldhparam module, creation of a DH Key fails.
My suggest is that "float" datatype is wrong for the "bits" parameter. Float adds a "." like 2048.0 which obviously fails.
Issue Type
Bug Report
Component Name
ssldhparam
Python Version
Python 3.10.6Ansible Version
Ansible Configuration
netscaler.adc Collection Version
Target NetScaler Version
14.1 17.38Equivalent NetScaler CLI Command
Steps to Reproduce
Expected Results
Dhkey is created
Actual Results
TASK [netscaler_SSLPROFILE : Create SSL DH Key] ****************************************************************************************************************************************************************************************************************** fatal: [dkr_adc4 -> localhost]: FAILED! => {"changed": true, "loglines": ["DEBUG: Initializing ModuleExecutor for resource ssldhparam", "TRACE: ENTRY: common.get_valid_desired_states() called with ('ssldhparam',), {}", "TRACE: EXIT: common.get_valid_desired_states() returned {'created'}", "TRACE: ENTRY: common.get_netscaler_version() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f55f0ff2a40>,), {}", "TRACE: ENTRY: common.get_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f55f0ff2a40>, 'nsversion'), {}", "WARNING: Resource name nsversion not found in NITRO_RESOURCE_MAP to get get_arg_keys", "TRACE: ENTRY: client.get() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f55f0ff2a40>,), {'resource': 'nsversion', 'id': None, 'args': {}}", "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f55f0ff2a40>, 'nsversion'), {'id': None, 'args': {}, 'attrs': None, 'filter': None}", "TRACE: EXIT: client.url_builder() returned https://10.205.102.4/nitro/v1/config/nsversion", "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f55f0ff2a40>, 'GET', 'https://10.205.102.4/nitro/v1/config/nsversion'), {}", "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7f55f1018b50>, 'check_mode': False, 'api_path': 'nitro/v1/config', '_headers': {'Content-Type': 'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER': '********', 'X-NITRO-PASS': '********'}}", "DEBUG: fetch_url()-resonse-info= GET: {'url': 'https://10.205.102.4/nitro/v1/config/nsversion', 'status': 200, 'date': 'Mon, 08 Apr 2024 12:03:49 GMT', 'server': 'Apache', 'x-frame-options': 'SAMEORIGIN', 'expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'cache-control': 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'pragma': 'no-cache', 'vary': 'Accept-Encoding', 'feature-policy': \"camera 'none'; microphone 'none'; geolocation 'none'\", 'referrer-policy': 'no-referrer', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'content-length': '201', 'content-type': 'application/json; charset=utf-8', 'connection': 'close', 'cookies_string': '', 'cookies': {}, 'msg': 'OK (201 bytes)'}", "TRACE: EXIT: client.send() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'nsversion': {'installedversion': False, 'version': 'NetScaler NS14.1: Build 17.38.nc, Date: Feb 7 2024, 21:58:09 (64-bit)', 'mode': '1'}})", "TRACE: EXIT: client.get() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'nsversion': {'installedversion': False, 'version': 'NetScaler NS14.1: Build 17.38.nc, Date: Feb 7 2024, 21:58:09 (64-bit)', 'mode': '1'}})", "TRACE: ENTRY: common.fix_nitro_anomolies() called with ('nsversion', {}, [{'installedversion': False, 'version': 'NetScaler NS14.1: Build 17.38.nc, Date: Feb 7 2024, 21:58:09 (64-bit)', 'mode': '1'}]), {}", "TRACE: EXIT: common.fix_nitro_anomolies() returned [{'installedversion': False, 'version': 'NetScaler NS14.1: Build 17.38.nc, Date: Feb 7 2024, 21:58:09 (64-bit)', 'mode': '1'}]", "TRACE: EXIT: common.get_resource() returned (True, [{'installedversion': False, 'version': 'NetScaler NS14.1: Build 17.38.nc, Date: Feb 7 2024, 21:58:09 (64-bit)', 'mode': '1'}])", "TRACE: EXIT: common.get_netscaler_version() returned (14.1, 17.38)", "INFO: NetScaler version: 14.1-17.38", "DEBUG: All params (including non module-specific params) are: {'nsip': '10.205.102.4', 'nitro_user': '********', 'nitro_pass': '********', 'validate_certs': False, 'state': 'created', 'bits': 2048.0, 'dhfile': 'nsconfig/ssl/dhkey_gen2_2048', 'gen': '2', 'nitro_protocol': 'https', 'save_config': False, 'api_path': 'nitro/v1/config', 'nitro_auth_token': None}", "TRACE: ENTRY: module_executor._filter_resource_module_params() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f55f1018a30>,), {}", "DEBUG: self.module.params: {'nsip': '10.205.102.4', 'nitro_user': '********', 'nitro_pass': '********', 'validate_certs': False, 'state': 'created', 'bits': 2048.0, 'dhfile': 'nsconfig/ssl/dhkey_gen2_2048', 'gen': '2', 'nitro_protocol': 'https', 'save_config': False, 'api_path': 'nitro/v1/config', 'nitro_auth_token': None}", "DEBUG: Desired `ssldhparam` module specific params are: {'bits': 2048.0, 'dhfile': 'nsconfig/ssl/dhkey_gen2_2048', 'gen': '2'}", "TRACE: EXIT: module_executor._filter_resource_module_params() returned None", "TRACE: ENTRY: module_executor._filter_desired_bindings() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f55f1018a30>,), {}", "DEBUG: Desired `ssldhparam` module specific bindings are: {}", "TRACE: EXIT: module_executor._filter_desired_bindings() returned None", "TRACE: ENTRY: module_executor.main() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f55f1018a30>,), {}", "TRACE: ENTRY: module_executor.act_on_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f55f1018a30>,), {'action': 'create'}", "TRACE: ENTRY: common.create_resource_with_action() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f55f0ff2a40>, 'ssldhparam', {'bits': 2048.0, 'dhfile': 'nsconfig/ssl/dhkey_gen2_2048', 'gen': '2'}), {'action': 'create'}", "TRACE: ENTRY: common._check_create_resource_params() called with ('ssldhparam', {'bits': 2048.0, 'dhfile': 'nsconfig/ssl/dhkey_gen2_2048', 'gen': '2'}), {'action': 'create'}", "TRACE: EXIT: common._check_create_resource_params() returned (True, None, {'bits': 2048.0, 'dhfile': 'nsconfig/ssl/dhkey_gen2_2048', 'gen': '2'})", "TRACE: ENTRY: client.post() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f55f0ff2a40>,), {'post_data': {'ssldhparam': {'bits': 2048.0, 'dhfile': 'nsconfig/ssl/dhkey_gen2_2048', 'gen': '2'}}, 'resource': 'ssldhparam', 'action': 'create'}", "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f55f0ff2a40>, 'ssldhparam'), {'action': 'create'}", "TRACE: EXIT: client.url_builder() returned https://10.205.102.4/nitro/v1/config/ssldhparam?action=create", "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f55f0ff2a40>, 'POST', 'https://10.205.102.4/nitro/v1/config/ssldhparam?action=create', '{\"ssldhparam\": {\"bits\": 2048.0, \"dhfile\": \"nsconfig/ssl/dhkey_gen2_2048\", \"gen\": \"2\"}}'), {}", "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7f55f1018b50>, 'check_mode': False, 'api_path': 'nitro/v1/config', '_headers': {'Content-Type': 'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER': '********', 'X-NITRO-PASS': '********'}}", "DEBUG: fetch_url()-resonse-info= POST: {'url': 'https://10.205.102.4/nitro/v1/config/ssldhparam?action=create', 'status': -1, 'msg': 'Connection failure: The read operation timed out'}", "TRACE: EXIT: client.send() returned (-1, {})", "TRACE: EXIT: client.post() returned (-1, {})", "TRACE: ENTRY: common.return_response() called with (), {'status_code': -1, 'response_body': {}, 'operation': 'create_resource', 'resource_name': 'ssldhparam'}", "ERROR: create_resource FAILED; status_code: -1; Reason:{}", "TRACE: EXIT: common.return_response() returned (False, 'ERROR: create_resource FAILED; status_code: -1; Reason:{}')", "TRACE: EXIT: common.create_resource_with_action() returned (False, 'ERROR: create_resource FAILED; status_code: -1; Reason:{}')", "TRACE: ENTRY: module_executor.return_failure() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f55f1018a30>, 'ERROR: create_resource FAILED; status_code: -1; Reason:{}'), {}"], "msg": "ERROR: create_resource FAILED; status_code: -1; Reason:{}"}Additional Notes
My suggest is that "float" datatype is wrong for the "bits" parameter. Float adds a "." like 2048.0 which obviously fails.
GUI working:
{"params":{"action":"create","warning":"YES"},"ssldhparam":{"dhfile":"/nsconfig/ssl/dhkey1024","bits":"1024","gen":"2"}}
vs.
Ansible non working:
{"ssldhparam": {"bits": 2048.0, "dhfile": "nsconfig/ssl/dhkey_gen2_2048",