Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: netscaler.adc.servicegroup module is not idempotent when tcpprofilename attribute is used #392

Open
sumanth-lingappa opened this issue Mar 21, 2024 · 0 comments
Assignees
Labels

Comments

@sumanth-lingappa
Copy link
Collaborator

sumanth-lingappa commented Mar 21, 2024

Summary

When tcpprofilename is used with nstcp_default_profile, netscaler.adc.servicegroup module is not idempotent.
This is because, NITRO's GET response is missing tcpprofilename

Note: This scenario does not occur when tcpprofilename is other than nstcp_default_profile

Issue Type

Bug Report

Component Name

servicegroupname

Python Version

$ python --version # or python3 --version
Python 3.11.7

Ansible Version

$ ansible --version
ansible [core 2.15.6]
  config file = /Users/username/.ansible.cfg
  configured module search path = ['/Users/username/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/username/.virtualenvs/ansible-cert1/lib/python3.11/site-packages/ansible
  ansible collection location = /Users/username/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/username/.virtualenvs/ansible-cert1/bin/ansible
  python version = 3.11.7 (main, Dec  4 2023, 18:10:11) [Clang 15.0.0 (clang-1500.1.0.2.5)] (/Users/username/.virtualenvs/ansible-cert1/bin/python)
  jinja version = 3.1.2
  libyaml = True

Ansible Configuration

$ ansible-config dump --only-changed

netscaler.adc Collection Version

$ ansible-galaxy collection list netscaler.adc
netscaler.adc 2.5.0

Target NetScaler Version

> show ns version
14.1

Equivalent NetScaler CLI Command

add serviceGroup test_ssl SSL -tcpProfileName nstcp_default_profile 

Steps to Reproduce

---
- name: add servicegroup
  hosts: localhost
  gather_facts: false
  module_defaults:
    group/netscaler.adc.default_args:
      nsip: 10.10.10.10
      nitro_user: nsroot
      nitro_pass: secret
      nitro_protocol: http
      validate_certs: false
      save_config: false
  tasks:
    - name: add sg
      netscaler.adc.servicegroup:
        servicegroupname: test-sg
        servicetype: SSL
        cip: ENABLED
        cipheader: X-Forwarded-For
        tcpprofilename: nstcp_default_profile

Expected Results

When I run the above playbook second time, I should not get any updates from the ansible-playbook. The 2nd time onward running the same playbook should be idempotenet

Actual Results

    "loglines": [
        "DEBUG: Initializing ModuleExecutor for resource servicegroup",
        "TRACE: ENTRY: common.get_valid_desired_states() called with ('servicegroup',), {}",
        "TRACE: EXIT: common.get_valid_desired_states() returned {'present', 'disabled', 'unset', 'enabled', 'absent'}",
        "TRACE: ENTRY: common.get_netscaler_version() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x1077dab50>,), {}",
        "TRACE: ENTRY: common.get_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x1077dab50>, '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 0x1077dab50>,), {'resource': 'nsversion', 'id': None, 'args': {}}",
        "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x1077dab50>, 'nsversion'), {'id': None, 'args': {}, 'attrs': None, 'filter': None}",
        "TRACE: EXIT: client.url_builder() returned http://10.10.10.10/nitro/v1/config/nsversion",
        "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x1077dab50>, 'GET', 'http://10.10.10.10/nitro/v1/config/nsversion'), {}",
        "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x10a0240d0>, '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': 'http://10.10.10.10/nitro/v1/config/nsversion', 'status': 200, 'date': 'Thu, 21 Mar 2024 04:10: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 21.20.nc, Date: Feb  7 2024, 18:19:12   (64-bit)', 'mode': '1'}})",
        "TRACE: EXIT: client.get() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'nsversion': {'installedversion': False, 'version': 'NetScaler NS14.1: Build 21.20.nc, Date: Feb  7 2024, 18:19:12   (64-bit)', 'mode': '1'}})",
        "TRACE: ENTRY: common.fix_nitro_anomolies() called with ('nsversion', {}, [{'installedversion': False, 'version': 'NetScaler NS14.1: Build 21.20.nc, Date: Feb  7 2024, 18:19:12   (64-bit)', 'mode': '1'}]), {}",
        "TRACE: EXIT: common.fix_nitro_anomolies() returned [{'installedversion': False, 'version': 'NetScaler NS14.1: Build 21.20.nc, Date: Feb  7 2024, 18:19:12   (64-bit)', 'mode': '1'}]",
        "TRACE: EXIT: common.get_resource() returned (True, [{'installedversion': False, 'version': 'NetScaler NS14.1: Build 21.20.nc, Date: Feb  7 2024, 18:19:12   (64-bit)', 'mode': '1'}])",
        "TRACE: EXIT: common.get_netscaler_version() returned (14.1, 21.2)",
        "INFO: NetScaler version: 14.1-21.2",
        "DEBUG: All params (including non module-specific params) are: {'nsip': '10.10.10.10', 'nitro_user': '********', 'nitro_pass': '********', 'nitro_protocol': 'http', 'validate_certs': False, 'save_config': False, 'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'servicetype': 'SSL', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'tcpprofilename': 'nstcp_default_profile', 'api_path': 'nitro/v1/config', 'state': 'present', 'nitro_auth_token': None, 'appflowlog': None, 'autodelayedtrofs': None, 'autodisabledelay': None, 'autodisablegraceful': None, 'autoscale': None, 'cacheable': None, 'cachetype': None, 'cka': None, 'clttimeout': None, 'cmp': None, 'comment': None, 'customserverid': None, 'dbsttl': None, 'delay': None, 'downstateflush': None, 'dup_weight': None, 'graceful': None, 'hashid': None, 'healthmonitor': None, 'httpprofilename': None, 'includemembers': None, 'maxbandwidth': None, 'maxclient': None, 'maxreq': None, 'memberport': None, 'monconnectionclose': None, 'monitor_name_svc': None, 'monthreshold': None, 'nameserver': None, 'netprofile': None, 'newname': None, 'order': None, 'pathmonitor': None, 'pathmonitorindv': None, 'port': None, 'rtspsessionidremap': None, 'serverid': None, 'servername': None, 'servicegroup_lbmonitor_binding': None, 'servicegroup_servicegroupmember_binding': None, 'sp': None, 'svrtimeout': None, 'tcpb': None, 'td': None, 'useproxyport': None, 'usip': None, 'weight': None}",
        "TRACE: ENTRY: module_executor._filter_resource_module_params() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x107c49410>,), {}",
        "DEBUG: self.module.params: {'nsip': '10.10.10.10', 'nitro_user': '********', 'nitro_pass': '********', 'nitro_protocol': 'http', 'validate_certs': False, 'save_config': False, 'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'servicetype': 'SSL', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'tcpprofilename': 'nstcp_default_profile', 'api_path': 'nitro/v1/config', 'state': 'present', 'nitro_auth_token': None, 'appflowlog': None, 'autodelayedtrofs': None, 'autodisabledelay': None, 'autodisablegraceful': None, 'autoscale': None, 'cacheable': None, 'cachetype': None, 'cka': None, 'clttimeout': None, 'cmp': None, 'comment': None, 'customserverid': None, 'dbsttl': None, 'delay': None, 'downstateflush': None, 'dup_weight': None, 'graceful': None, 'hashid': None, 'healthmonitor': None, 'httpprofilename': None, 'includemembers': None, 'maxbandwidth': None, 'maxclient': None, 'maxreq': None, 'memberport': None, 'monconnectionclose': None, 'monitor_name_svc': None, 'monthreshold': None, 'nameserver': None, 'netprofile': None, 'newname': None, 'order': None, 'pathmonitor': None, 'pathmonitorindv': None, 'port': None, 'rtspsessionidremap': None, 'serverid': None, 'servername': None, 'servicegroup_lbmonitor_binding': None, 'servicegroup_servicegroupmember_binding': None, 'sp': None, 'svrtimeout': None, 'tcpb': None, 'td': None, 'useproxyport': None, 'usip': None, 'weight': None}",
        "DEBUG: Desired `servicegroup` module specific params are: {'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'servicetype': 'SSL', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'tcpprofilename': 'nstcp_default_profile'}",
        "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 0x107c49410>,), {}",
        "DEBUG: Desired `servicegroup` module specific bindings are: {}",
        "TRACE: EXIT: module_executor._filter_desired_bindings() returned None",
        "TRACE: ENTRY: module_executor.get_existing_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x107c49410>,), {}",
        "TRACE: ENTRY: common.get_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x1077dab50>,), {'resource_name': 'servicegroup', 'resource_id': 'SG_newhostname-dev.placeholder.com', 'resource_module_params': {'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'servicetype': 'SSL', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'tcpprofilename': 'nstcp_default_profile'}}",
        "TRACE: ENTRY: client.get() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x1077dab50>,), {'resource': 'servicegroup', 'id': 'SG_newhostname-dev.placeholder.com', 'args': {}}",
        "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x1077dab50>, 'servicegroup'), {'id': 'SG_newhostname-dev.placeholder.com', 'args': {}, 'attrs': None, 'filter': None}",
        "TRACE: EXIT: client.url_builder() returned http://10.10.10.10/nitro/v1/config/servicegroup/SG_newhostname-dev.placeholder.com",
        "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x1077dab50>, 'GET', 'http://10.10.10.10/nitro/v1/config/servicegroup/SG_newhostname-dev.placeholder.com'), {}",
        "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x10a0240d0>, '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': 'http://10.10.10.10/nitro/v1/config/servicegroup/SG_newhostname-dev.placeholder.com', 'status': 200, 'date': 'Thu, 21 Mar 2024 04:10:50 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': '1572', 'content-type': 'application/json; charset=utf-8', 'connection': 'close', 'cookies_string': '', 'cookies': {}, 'msg': 'OK (1572 bytes)'}",
        "TRACE: EXIT: client.send() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'servicegroup': [{'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'numofconnections': 0, 'servicetype': 'SSL', 'td': '0', 'serviceconftype': True, 'value': 'SSL feature disabled', 'cachetype': 'SERVER', 'maxclient': '0', 'maxreq': '0', 'cacheable': 'NO', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'usip': 'NO', 'pathmonitor': 'NO', 'pathmonitorindv': 'NO', 'useproxyport': 'YES', 'monweight': '0', 'sp': 'OFF', 'rtspsessionidremap': 'OFF', 'clttimeout': 180, 'svrtimeout': 360, 'cka': 'NO', 'tcpb': 'NO', 'cmp': 'NO', 'maxbandwidth': '0', 'state': 'ENABLED', 'svrstate': 'DOWN', 'delay': 0, 'ip': '0.0.0.0', 'monthreshold': '0', 'monstate': 'ENABLED', 'monitor_state': 'Unknown', 'monstatcode': 0, 'monstatparam1': 0, 'monstatparam2': 0, 'monstatparam3': 0, 'monitortotalprobes': '0', 'monitortotalfailedprobes': '0', 'monitorcurrentfailedprobes': '0', 'downstateflush': 'ENABLED', 'statechangetimesec': 'Thu Mar 21 04:10:42 2024', 'statechangetimemsec': '469', 'tickssincelaststatechange': '760', 'stateupdatereason': '0', 'clmonowner': '0', 'clmonview': '0', 'groupcount': '0', 'hashid': '0', 'graceful': 'NO', 'healthmonitor': 'YES', 'appflowlog': 'ENABLED', 'autoscale': 'DISABLED', 'memberport': 0, 'serviceipstr': '0.0.0.0', 'passive': False, 'servicegroupeffectivestate': 'DOWN', 'monconnectionclose': 'NONE', 'nodefaultbindings': 'NO', 'nameserver': '0.0.0.0', 'dbsttl': 0, 'svcitmactsvcs': '0', 'svcitmboundsvcs': '0', 'responsetime': '0', 'orderstr': 'Default', 'trofsdelay': '0'}]})",
        "TRACE: EXIT: client.get() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'servicegroup': [{'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'numofconnections': 0, 'servicetype': 'SSL', 'td': '0', 'serviceconftype': True, 'value': 'SSL feature disabled', 'cachetype': 'SERVER', 'maxclient': '0', 'maxreq': '0', 'cacheable': 'NO', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'usip': 'NO', 'pathmonitor': 'NO', 'pathmonitorindv': 'NO', 'useproxyport': 'YES', 'monweight': '0', 'sp': 'OFF', 'rtspsessionidremap': 'OFF', 'clttimeout': 180, 'svrtimeout': 360, 'cka': 'NO', 'tcpb': 'NO', 'cmp': 'NO', 'maxbandwidth': '0', 'state': 'ENABLED', 'svrstate': 'DOWN', 'delay': 0, 'ip': '0.0.0.0', 'monthreshold': '0', 'monstate': 'ENABLED', 'monitor_state': 'Unknown', 'monstatcode': 0, 'monstatparam1': 0, 'monstatparam2': 0, 'monstatparam3': 0, 'monitortotalprobes': '0', 'monitortotalfailedprobes': '0', 'monitorcurrentfailedprobes': '0', 'downstateflush': 'ENABLED', 'statechangetimesec': 'Thu Mar 21 04:10:42 2024', 'statechangetimemsec': '469', 'tickssincelaststatechange': '760', 'stateupdatereason': '0', 'clmonowner': '0', 'clmonview': '0', 'groupcount': '0', 'hashid': '0', 'graceful': 'NO', 'healthmonitor': 'YES', 'appflowlog': 'ENABLED', 'autoscale': 'DISABLED', 'memberport': 0, 'serviceipstr': '0.0.0.0', 'passive': False, 'servicegroupeffectivestate': 'DOWN', 'monconnectionclose': 'NONE', 'nodefaultbindings': 'NO', 'nameserver': '0.0.0.0', 'dbsttl': 0, 'svcitmactsvcs': '0', 'svcitmboundsvcs': '0', 'responsetime': '0', 'orderstr': 'Default', 'trofsdelay': '0'}]})",
        "TRACE: ENTRY: common.fix_nitro_anomolies() called with ('servicegroup', {'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'servicetype': 'SSL', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'tcpprofilename': 'nstcp_default_profile'}, [{'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'numofconnections': 0, 'servicetype': 'SSL', 'td': '0', 'serviceconftype': True, 'value': 'SSL feature disabled', 'cachetype': 'SERVER', 'maxclient': '0', 'maxreq': '0', 'cacheable': 'NO', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'usip': 'NO', 'pathmonitor': 'NO', 'pathmonitorindv': 'NO', 'useproxyport': 'YES', 'monweight': '0', 'sp': 'OFF', 'rtspsessionidremap': 'OFF', 'clttimeout': 180, 'svrtimeout': 360, 'cka': 'NO', 'tcpb': 'NO', 'cmp': 'NO', 'maxbandwidth': '0', 'state': 'ENABLED', 'svrstate': 'DOWN', 'delay': 0, 'ip': '0.0.0.0', 'monthreshold': '0', 'monstate': 'ENABLED', 'monitor_state': 'Unknown', 'monstatcode': 0, 'monstatparam1': 0, 'monstatparam2': 0, 'monstatparam3': 0, 'monitortotalprobes': '0', 'monitortotalfailedprobes': '0', 'monitorcurrentfailedprobes': '0', 'downstateflush': 'ENABLED', 'statechangetimesec': 'Thu Mar 21 04:10:42 2024', 'statechangetimemsec': '469', 'tickssincelaststatechange': '760', 'stateupdatereason': '0', 'clmonowner': '0', 'clmonview': '0', 'groupcount': '0', 'hashid': '0', 'graceful': 'NO', 'healthmonitor': 'YES', 'appflowlog': 'ENABLED', 'autoscale': 'DISABLED', 'memberport': 0, 'serviceipstr': '0.0.0.0', 'passive': False, 'servicegroupeffectivestate': 'DOWN', 'monconnectionclose': 'NONE', 'nodefaultbindings': 'NO', 'nameserver': '0.0.0.0', 'dbsttl': 0, 'svcitmactsvcs': '0', 'svcitmboundsvcs': '0', 'responsetime': '0', 'orderstr': 'Default', 'trofsdelay': '0'}]), {}",
        "TRACE: EXIT: common.fix_nitro_anomolies() returned [{'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'numofconnections': 0, 'servicetype': 'SSL', 'td': '0', 'serviceconftype': True, 'value': 'SSL feature disabled', 'cachetype': 'SERVER', 'maxclient': '0', 'maxreq': '0', 'cacheable': 'NO', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'usip': 'NO', 'pathmonitor': 'NO', 'pathmonitorindv': 'NO', 'useproxyport': 'YES', 'monweight': '0', 'sp': 'OFF', 'rtspsessionidremap': 'OFF', 'clttimeout': 180, 'svrtimeout': 360, 'cka': 'NO', 'tcpb': 'NO', 'cmp': 'NO', 'maxbandwidth': '0', 'state': 'ENABLED', 'svrstate': 'DOWN', 'delay': 0, 'ip': '0.0.0.0', 'monthreshold': '0', 'monstate': 'ENABLED', 'monitor_state': 'Unknown', 'monstatcode': 0, 'monstatparam1': 0, 'monstatparam2': 0, 'monstatparam3': 0, 'monitortotalprobes': '0', 'monitortotalfailedprobes': '0', 'monitorcurrentfailedprobes': '0', 'downstateflush': 'ENABLED', 'statechangetimesec': 'Thu Mar 21 04:10:42 2024', 'statechangetimemsec': '469', 'tickssincelaststatechange': '760', 'stateupdatereason': '0', 'clmonowner': '0', 'clmonview': '0', 'groupcount': '0', 'hashid': '0', 'graceful': 'NO', 'healthmonitor': 'YES', 'appflowlog': 'ENABLED', 'autoscale': 'DISABLED', 'memberport': 0, 'serviceipstr': '0.0.0.0', 'passive': False, 'servicegroupeffectivestate': 'DOWN', 'monconnectionclose': 'NONE', 'nodefaultbindings': 'NO', 'nameserver': '0.0.0.0', 'dbsttl': 0, 'svcitmactsvcs': '0', 'svcitmboundsvcs': '0', 'responsetime': '0', 'orderstr': 'Default', 'trofsdelay': '0'}]",
        "TRACE: EXIT: common.get_resource() returned (True, [{'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'numofconnections': 0, 'servicetype': 'SSL', 'td': '0', 'serviceconftype': True, 'value': 'SSL feature disabled', 'cachetype': 'SERVER', 'maxclient': '0', 'maxreq': '0', 'cacheable': 'NO', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'usip': 'NO', 'pathmonitor': 'NO', 'pathmonitorindv': 'NO', 'useproxyport': 'YES', 'monweight': '0', 'sp': 'OFF', 'rtspsessionidremap': 'OFF', 'clttimeout': 180, 'svrtimeout': 360, 'cka': 'NO', 'tcpb': 'NO', 'cmp': 'NO', 'maxbandwidth': '0', 'state': 'ENABLED', 'svrstate': 'DOWN', 'delay': 0, 'ip': '0.0.0.0', 'monthreshold': '0', 'monstate': 'ENABLED', 'monitor_state': 'Unknown', 'monstatcode': 0, 'monstatparam1': 0, 'monstatparam2': 0, 'monstatparam3': 0, 'monitortotalprobes': '0', 'monitortotalfailedprobes': '0', 'monitorcurrentfailedprobes': '0', 'downstateflush': 'ENABLED', 'statechangetimesec': 'Thu Mar 21 04:10:42 2024', 'statechangetimemsec': '469', 'tickssincelaststatechange': '760', 'stateupdatereason': '0', 'clmonowner': '0', 'clmonview': '0', 'groupcount': '0', 'hashid': '0', 'graceful': 'NO', 'healthmonitor': 'YES', 'appflowlog': 'ENABLED', 'autoscale': 'DISABLED', 'memberport': 0, 'serviceipstr': '0.0.0.0', 'passive': False, 'servicegroupeffectivestate': 'DOWN', 'monconnectionclose': 'NONE', 'nodefaultbindings': 'NO', 'nameserver': '0.0.0.0', 'dbsttl': 0, 'svcitmactsvcs': '0', 'svcitmboundsvcs': '0', 'responsetime': '0', 'orderstr': 'Default', 'trofsdelay': '0'}])",
        "TRACE: EXIT: module_executor.get_existing_resource() returned {'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'numofconnections': 0, 'servicetype': 'SSL', 'td': '0', 'serviceconftype': True, 'value': 'SSL feature disabled', 'cachetype': 'SERVER', 'maxclient': '0', 'maxreq': '0', 'cacheable': 'NO', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'usip': 'NO', 'pathmonitor': 'NO', 'pathmonitorindv': 'NO', 'useproxyport': 'YES', 'monweight': '0', 'sp': 'OFF', 'rtspsessionidremap': 'OFF', 'clttimeout': 180, 'svrtimeout': 360, 'cka': 'NO', 'tcpb': 'NO', 'cmp': 'NO', 'maxbandwidth': '0', 'state': 'ENABLED', 'svrstate': 'DOWN', 'delay': 0, 'ip': '0.0.0.0', 'monthreshold': '0', 'monstate': 'ENABLED', 'monitor_state': 'Unknown', 'monstatcode': 0, 'monstatparam1': 0, 'monstatparam2': 0, 'monstatparam3': 0, 'monitortotalprobes': '0', 'monitortotalfailedprobes': '0', 'monitorcurrentfailedprobes': '0', 'downstateflush': 'ENABLED', 'statechangetimesec': 'Thu Mar 21 04:10:42 2024', 'statechangetimemsec': '469', 'tickssincelaststatechange': '760', 'stateupdatereason': '0', 'clmonowner': '0', 'clmonview': '0', 'groupcount': '0', 'hashid': '0', 'graceful': 'NO', 'healthmonitor': 'YES', 'appflowlog': 'ENABLED', 'autoscale': 'DISABLED', 'memberport': 0, 'serviceipstr': '0.0.0.0', 'passive': False, 'servicegroupeffectivestate': 'DOWN', 'monconnectionclose': 'NONE', 'nodefaultbindings': 'NO', 'nameserver': '0.0.0.0', 'dbsttl': 0, 'svcitmactsvcs': '0', 'svcitmboundsvcs': '0', 'responsetime': '0', 'orderstr': 'Default', 'trofsdelay': '0'}",
        "TRACE: ENTRY: module_executor.main() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x107c49410>,), {}",
        "TRACE: ENTRY: module_executor.create_or_update() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x107c49410>,), {}",
        "TRACE: ENTRY: module_executor.update_diff_list() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x107c49410>,), {'existing': {'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'numofconnections': 0, 'servicetype': 'SSL', 'td': '0', 'serviceconftype': True, 'value': 'SSL feature disabled', 'cachetype': 'SERVER', 'maxclient': '0', 'maxreq': '0', 'cacheable': 'NO', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'usip': 'NO', 'pathmonitor': 'NO', 'pathmonitorindv': 'NO', 'useproxyport': 'YES', 'monweight': '0', 'sp': 'OFF', 'rtspsessionidremap': 'OFF', 'clttimeout': 180, 'svrtimeout': 360, 'cka': 'NO', 'tcpb': 'NO', 'cmp': 'NO', 'maxbandwidth': '0', 'state': 'ENABLED', 'svrstate': 'DOWN', 'delay': 0, 'ip': '0.0.0.0', 'monthreshold': '0', 'monstate': 'ENABLED', 'monitor_state': 'Unknown', 'monstatcode': 0, 'monstatparam1': 0, 'monstatparam2': 0, 'monstatparam3': 0, 'monitortotalprobes': '0', 'monitortotalfailedprobes': '0', 'monitorcurrentfailedprobes': '0', 'downstateflush': 'ENABLED', 'statechangetimesec': 'Thu Mar 21 04:10:42 2024', 'statechangetimemsec': '469', 'tickssincelaststatechange': '760', 'stateupdatereason': '0', 'clmonowner': '0', 'clmonview': '0', 'groupcount': '0', 'hashid': '0', 'graceful': 'NO', 'healthmonitor': 'YES', 'appflowlog': 'ENABLED', 'autoscale': 'DISABLED', 'memberport': 0, 'serviceipstr': '0.0.0.0', 'passive': False, 'servicegroupeffectivestate': 'DOWN', 'monconnectionclose': 'NONE', 'nodefaultbindings': 'NO', 'nameserver': '0.0.0.0', 'dbsttl': 0, 'svcitmactsvcs': '0', 'svcitmboundsvcs': '0', 'responsetime': '0', 'orderstr': 'Default', 'trofsdelay': '0'}, 'desired': {'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'servicetype': 'SSL', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'tcpprofilename': 'nstcp_default_profile'}}",
        "TRACE: EXIT: module_executor.update_diff_list() returned None",
        "TRACE: ENTRY: module_executor.is_resource_identical() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x107c49410>,), {}",
        "TRACE: ENTRY: module_executor.is_attribute_equal() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x107c49410>, 'servicegroupname', 'SG_newhostname-dev.placeholder.com', 'SG_newhostname-dev.placeholder.com'), {}",
        "TRACE: EXIT: module_executor.is_attribute_equal() returned True",
        "TRACE: ENTRY: module_executor.is_attribute_equal() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x107c49410>, 'servicetype', 'SSL', 'SSL'), {}",
        "TRACE: EXIT: module_executor.is_attribute_equal() returned True",
        "TRACE: ENTRY: module_executor.is_attribute_equal() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x107c49410>, 'cip', 'ENABLED', 'ENABLED'), {}",
        "TRACE: EXIT: module_executor.is_attribute_equal() returned True",
        "TRACE: ENTRY: module_executor.is_attribute_equal() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x107c49410>, 'cipheader', 'X-Forwarded-For', 'X-Forwarded-For'), {}",
        "TRACE: EXIT: module_executor.is_attribute_equal() returned True",
        "TRACE: ENTRY: module_executor.is_attribute_equal() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x107c49410>, 'tcpprofilename', None, 'nstcp_default_profile'), {}",
        "TRACE: EXIT: module_executor.is_attribute_equal() returned False",
        "DEBUG: Attribute `tcpprofilename` differs. Desired: (<class 'str'>) nstcp_default_profile. Existing: (<class 'NoneType'>) None",
        "TRACE: EXIT: module_executor.is_resource_identical() returned False",
        "INFO: Resource servicegroup:SG_newhostname-dev.placeholder.com exists. Will be UPDATED.",
        "TRACE: ENTRY: common.update_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x1077dab50>, 'servicegroup', {'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'servicetype': 'SSL', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'tcpprofilename': 'nstcp_default_profile'}), {}",
        "TRACE: ENTRY: common._check_update_resource_params() called with ('servicegroup', {'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'servicetype': 'SSL', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'tcpprofilename': 'nstcp_default_profile'}), {}",
        "WARNING: Key `servicetype` is not allowed for the resource `servicegroup` for the UPDATE operation. Skipping the key for the operation",
        "TRACE: EXIT: common._check_update_resource_params() returned (True, None, {'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'tcpprofilename': 'nstcp_default_profile'})",
        "TRACE: ENTRY: client.put() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x1077dab50>,), {'put_data': {'servicegroup': {'servicegroupname': 'SG_newhostname-dev.placeholder.com', 'cip': 'ENABLED', 'cipheader': 'X-Forwarded-For', 'tcpprofilename': 'nstcp_default_profile'}}, 'resource': 'servicegroup'}",
        "TRACE: ENTRY: client.url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x1077dab50>, 'servicegroup'), {'id': None}",
        "TRACE: EXIT: client.url_builder() returned http://10.10.10.10/nitro/v1/config/servicegroup",
        "TRACE: ENTRY: client.send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x1077dab50>, 'PUT', 'http://10.10.10.10/nitro/v1/config/servicegroup', '{\"servicegroup\": {\"servicegroupname\": \"SG_newhostname-dev.placeholder.com\", \"cip\": \"ENABLED\", \"cipheader\": \"X-Forwarded-For\", \"tcpprofilename\": \"nstcp_default_profile\"}}'), {}",
        "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x10a0240d0>, '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= PUT: {'url': 'http://10.10.10.10/nitro/v1/config/servicegroup', 'status': 200, 'date': 'Thu, 21 Mar 2024 04:10:50 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', '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': '57', 'content-type': 'application/json; charset=utf-8', 'connection': 'close', 'cookies_string': '', 'cookies': {}, 'msg': 'OK (57 bytes)'}",
        "TRACE: EXIT: client.send() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE'})",
        "TRACE: EXIT: client.put() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE'})",
        "TRACE: ENTRY: common.return_response() called with (), {'status_code': 200, 'response_body': {'errorcode': 0, 'message': 'Done', 'severity': 'NONE'}, 'operation': 'update_resource', 'resource_name': 'servicegroup'}",
        "DEBUG: update_resource servicegroup SUCCESS",
        "TRACE: EXIT: common.return_response() returned (True, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE'})",
        "TRACE: EXIT: common.update_resource() returned (True, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE'})",
        "TRACE: EXIT: module_executor.create_or_update() returned None",
        "TRACE: ENTRY: module_executor.sync_all_bindings() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x107c49410>,), {}",
        "TRACE: EXIT: module_executor.sync_all_bindings() returned None",
        "TRACE: ENTRY: module_executor.return_success() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x107c49410>,), {}"
    ]
}

PLAY RECAP *********************************************************************************************************************************************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

"TRACE: EXIT: module_executor.is_attribute_equal() returned False",
"DEBUG: Attribute tcpprofilename differs. Desired: (<class 'str'>) nstcp_default_profile. Existing: (<class 'NoneType'>) None",

Additional Notes

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant