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.policypatset: policypatset_pattern_binding: binding_members returning "KeyError: string" error #348

Closed
sscottkeefe opened this issue Jan 16, 2024 · 5 comments
Assignees
Labels

Comments

@sscottkeefe
Copy link

Summary

When I run the policypatset module with the pattern binding and binding_members, it just returns an error even though I seemingly have used valid formatting; it's difficult to say if it's a fault of my own when I can't find any official or otherwise examples for this particular module, but I've tried to follow documentation I've found. For what it's worth, there are existing patterns as outlined in the output below.

Issue Type

Bug Report

Component Name

policypatset: policypatset_pattern_binding: binding_members

Python Version

$ python --version # or python3 --version
3.10.12

Ansible Version

$ ansible --version
2.16.2

Ansible Configuration

$ ansible-config dump --only-changed

netscaler.adc Collection Version

$ ansible-galaxy collection list netscaler.adc
2.4.0

Target NetScaler Version

> show ns version
NS13.0 92.19.nc

Equivalent NetScaler CLI Command

https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/policy/policypatset_pattern_binding.html

Steps to Reproduce

netscaler.adc.policypatset:
        nsip: '{{ netscaler_ip }}'
        nitro_user: '{{ netscaler_user }}'
        nitro_pass: '{{ netscaler_password }}'
        name: '{{ netscaler_policyname }}'
        policypatset_pattern_binding:
          binding_members:
            - name: '{{ netscaler_policyname }}'
              string: '{{ netscaler_hostname }}'
          mode: "bind"

netscaler_hostname: placeholder-dev.test.com
netscaler_policyname: Placeholder_Name

Expected Results

Pattern binding addition to the existing policy added to the existing patterns.

{
    "errorcode": 0,
    "message": "Done",
    "severity": "NONE",
    "policypatset_pattern_binding": [
        {
            "name": "Placeholder_Name",
            "String": "existing_string1",
            "index": "1",
            "feature": "SYSTEM"
        },
        {
            "name": "Placeholder_Name",
            "String": "existing_string2",
            "index": "2",
            "feature": "SYSTEM"
        },
        {
            "name": "Placeholder_Name",
            "String": "existing_string3",
            "index": "3",
            "feature": "SYSTEM"
        },
		{
            "name": "Placeholder_Name",
            "String": "placeholder-dev.test.com",
            "index": "4",
            "feature": "SYSTEM"
        }
    ]
}

Actual Results

The full traceback is:
  File "/tmp/ansible_netscaler.adc.policypatset_payload_05ycr7ew/ansible_netscaler.adc.policypatset_payload.zip/ansible_collections/netscaler/adc/plugins/module_utils/module_executor.py", line 904, in main
    self.sync_all_bindings()
  File "/tmp/ansible_netscaler.adc.policypatset_payload_05ycr7ew/ansible_netscaler.adc.policypatset_payload.zip/ansible_collections/netscaler/adc/plugins/module_utils/decorators.py", line 19, in wrapper
    original_result = func(*args, **kwargs)
  File "/tmp/ansible_netscaler.adc.policypatset_payload_05ycr7ew/ansible_netscaler.adc.policypatset_payload.zip/ansible_collections/netscaler/adc/plugins/module_utils/module_executor.py", line 585, in sync_all_bindings
    self.sync_single_binding(binding_name)
  File "/tmp/ansible_netscaler.adc.policypatset_payload_05ycr7ew/ansible_netscaler.adc.policypatset_payload.zip/ansible_collections/netscaler/adc/plugins/module_utils/decorators.py", line 19, in wrapper
    original_result = func(*args, **kwargs)
  File "/tmp/ansible_netscaler.adc.policypatset_payload_05ycr7ew/ansible_netscaler.adc.policypatset_payload.zip/ansible_collections/netscaler/adc/plugins/module_utils/module_executor.py", line 618, in sync_single_binding
    existing_binding_members_bindprimary_keys = {
  File "/tmp/ansible_netscaler.adc.policypatset_payload_05ycr7ew/ansible_netscaler.adc.policypatset_payload.zip/ansible_collections/netscaler/adc/plugins/module_utils/module_executor.py", line 619, in <setcomp>
    x[bindprimary_key] for x in existing_bindings
fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "api_path": "nitro/v1/config",
            "comment": null,
            "name": "Placeholder_Name",
            "nitro_auth_token": null,
            "nitro_pass": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "nitro_protocol": "https",
            "nitro_user": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "nsip": "placeholderip",
            "patsetfile": null,
            "policypatset_pattern_binding": {
                "binding_members": [
                    {
                        "name": "Placeholder_Name",
                        "string": "placeholder-dev.test.com"
                    }
                ],
                "mode": "bind"
            },
            "save_config": false,
            "state": "present",
            "validate_certs": true
        }
    },
    "loglines": [
        "DEBUG: Initializing ModuleExecutor for resource policypatset",
        "TRACE: ENTRY: get_valid_desired_states() called with ('policypatset',), {}",
        "TRACE: EXIT: get_valid_desired_states() returned {'absent', 'present'}",
        "TRACE: ENTRY: get_netscaler_version() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f5b02f11210>,), {}",
        "TRACE: ENTRY: get_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f5b02f11210>, 'nsversion'), {}",
        "TRACE: ENTRY: get() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f5b02f11210>,), {'resource': 'nsversion', 'id': None, 'args': None, 'attrs': None, 'filter': None}",
        "TRACE: ENTRY: url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f5b02f11210>, 'nsversion'), {'id': None, 'args': None, 'attrs': None, 'filter': None}",
        "TRACE: EXIT: url_builder() returned https://placeholderip/nitro/v1/config/nsversion",
        "TRACE: ENTRY: send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f5b02f11210>, 'GET', 'https://placeholderip/nitro/v1/config/nsversion'), {}",
        "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7f5b0294c400>, '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={'url': 'https://placeholderip/nitro/v1/config/nsversion', 'status': 200, 'date': 'Tue, 16 Jan 2024 22:38:32 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: send() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'nsversion': {'installedversion': False, 'version': 'NetScaler NS13.0: Build 92.19.nc, Date: Sep 20 2023, 23:44:11   (64-bit)', 'mode': '1'}})",
        "TRACE: EXIT: get() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'nsversion': {'installedversion': False, 'version': 'NetScaler NS13.0: Build 92.19.nc, Date: Sep 20 2023, 23:44:11   (64-bit)', 'mode': '1'}})",
        "TRACE: EXIT: get_resource() returned [{'installedversion': False, 'version': 'NetScaler NS13.0: Build 92.19.nc, Date: Sep 20 2023, 23:44:11   (64-bit)', 'mode': '1'}]",
        "TRACE: EXIT: get_netscaler_version() returned (13.0, 92.19)",
        "INFO: NetScaler version: 13.0-92.19",
        "DEBUG: All params (including non module-specific params) are: {'nsip': 'placeholderip', 'nitro_user': '********', 'nitro_pass': '********', 'name': 'Placeholder_Name', 'policypatset_pattern_binding': {'binding_members': [{'string': 'placeholder-dev.test.com', 'name': 'Placeholder_Name'}], 'mode': 'bind'}, 'nitro_protocol': 'https', 'validate_certs': True, 'save_config': False, 'api_path': 'nitro/v1/config', 'state': 'present', 'nitro_auth_token': None, 'comment': None, 'patsetfile': None}",
        "TRACE: ENTRY: _filter_resource_module_params() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f5b0294c520>,), {}",
        "DEBUG: self.module.params: {'nsip': 'placeholderip', 'nitro_user': '********', 'nitro_pass': '********', 'name': 'Placeholder_Name', 'policypatset_pattern_binding': {'binding_members': [{'string': 'placeholder-dev.test.com', 'name': 'Placeholder_Name'}], 'mode': 'bind'}, 'nitro_protocol': 'https', 'validate_certs': True, 'save_config': False, 'api_path': 'nitro/v1/config', 'state': 'present', 'nitro_auth_token': None, 'comment': None, 'patsetfile': None}",
        "DEBUG: k: nsip, v: placeholderip",
        "DEBUG: k: nitro_user, v: ********",
        "DEBUG: k: nitro_pass, v: ********",
        "DEBUG: k: name, v: Placeholder_Name",
        "DEBUG: k: policypatset_pattern_binding, v: {'binding_members': [{'string': 'placeholder-dev.test.com', 'name': 'Placeholder_Name'}], 'mode': 'bind'}",
        "DEBUG: k: nitro_protocol, v: https",
        "DEBUG: k: validate_certs, v: True",
        "DEBUG: k: save_config, v: False",
        "DEBUG: k: api_path, v: nitro/v1/config",
        "DEBUG: k: state, v: present",
        "DEBUG: k: nitro_auth_token, v: None",
        "DEBUG: k: comment, v: None",
        "DEBUG: k: patsetfile, v: None",
        "DEBUG: Desired `policypatset` module specific params are: {'name': 'Placeholder_Name'}",
        "TRACE: EXIT: _filter_resource_module_params() returned None",
        "TRACE: ENTRY: _filter_desired_bindings() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f5b0294c520>,), {}",
        "DEBUG: Desired `policypatset` module specific bindings are: ['policypatset_pattern_binding']",
        "TRACE: EXIT: _filter_desired_bindings() returned None",
        "TRACE: ENTRY: get_existing_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f5b0294c520>,), {}",
        "TRACE: ENTRY: get_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f5b02f11210>,), {'resource_name': 'policypatset', 'resource_id': 'Placeholder_Name', 'args': {}, 'filter': {}}",
        "TRACE: ENTRY: get() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f5b02f11210>,), {'resource': 'policypatset', 'id': 'Placeholder_Name', 'args': {}, 'attrs': None, 'filter': {}}",
        "TRACE: ENTRY: url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f5b02f11210>, 'policypatset'), {'id': 'Placeholder_Name', 'args': {}, 'attrs': None, 'filter': {}}",
        "TRACE: EXIT: url_builder() returned https://placeholderip/nitro/v1/config/policypatset/Placeholder_Name",
        "TRACE: ENTRY: send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f5b02f11210>, 'GET', 'https://placeholderip/nitro/v1/config/policypatset/Placeholder_Name'), {}",
        "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7f5b0294c400>, '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={'url': 'https://placeholderip/nitro/v1/config/policypatset/Placeholder_Name', 'status': 200, 'date': 'Tue, 16 Jan 2024 22:38:32 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': '139', 'content-type': 'application/json; charset=utf-8', 'connection': 'close', 'cookies_string': '', 'cookies': {}, 'msg': 'OK (139 bytes)'}",
        "TRACE: EXIT: send() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'policypatset': [{'name': 'Placeholder_Name', 'index': '0', 'feature': 'SYSTEM'}]})",
        "TRACE: EXIT: get() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'policypatset': [{'name': 'Placeholder_Name', 'index': '0', 'feature': 'SYSTEM'}]})",
        "TRACE: EXIT: get_resource() returned [{'name': 'Placeholder_Name', 'index': '0', 'feature': 'SYSTEM'}]",
        "TRACE: EXIT: get_existing_resource() returned {'name': 'Placeholder_Name', 'index': '0', 'feature': 'SYSTEM'}",
        "TRACE: ENTRY: main() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f5b0294c520>,), {}",
        "TRACE: ENTRY: create_or_update() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f5b0294c520>,), {}",
        "TRACE: ENTRY: update_diff_list() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f5b0294c520>,), {'existing': {'name': 'Placeholder_Name', 'index': '0', 'feature': 'SYSTEM'}, 'desired': {'name': 'Placeholder_Name'}}",
        "TRACE: EXIT: update_diff_list() returned None",
        "TRACE: ENTRY: is_resource_identical() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f5b0294c520>,), {}",
        "TRACE: ENTRY: is_attribute_equal() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f5b0294c520>, 'name', 'Placeholder_Name', 'Placeholder_Name'), {}",
        "TRACE: EXIT: is_attribute_equal() returned True",
        "TRACE: EXIT: is_resource_identical() returned True",
        "INFO: Resource `policypatset:Placeholder_Name` exists and is identical. No change required.",
        "TRACE: EXIT: create_or_update() returned None",
        "TRACE: ENTRY: sync_all_bindings() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f5b0294c520>,), {}",
        "TRACE: ENTRY: sync_single_binding() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f5b0294c520>, 'policypatset_pattern_binding'), {}",
        "INFO: Binding mode is `bind`",
        "DEBUG: Desired binding members: [{'string': 'placeholder-dev.test.com', 'name': 'Placeholder_Name'}]",
        "TRACE: ENTRY: get_bindings() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f5b02f11210>,), {'binding_name': 'policypatset_pattern_binding', 'binding_id': 'Placeholder_Name'}",
        "TRACE: ENTRY: get_resource() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f5b02f11210>,), {'resource_name': 'policypatset_pattern_binding', 'resource_id': 'Placeholder_Name'}",
        "TRACE: ENTRY: get() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f5b02f11210>,), {'resource': 'policypatset_pattern_binding', 'id': 'Placeholder_Name', 'args': None, 'attrs': None, 'filter': None}",
        "TRACE: ENTRY: url_builder() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f5b02f11210>, 'policypatset_pattern_binding'), {'id': 'Placeholder_Name', 'args': None, 'attrs': None, 'filter': None}",
        "TRACE: EXIT: url_builder() returned https://placeholderip/nitro/v1/config/policypatset_pattern_binding/Placeholder_Name",
        "TRACE: ENTRY: send() called with (<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient object at 0x7f5b02f11210>, 'GET', 'https://placeholderip/nitro/v1/config/policypatset_pattern_binding/Placeholder_Name'), {}",
        "DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at 0x7f5b0294c400>, '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={'url': 'https://placeholderip/nitro/v1/config/policypatset_pattern_binding/Placeholder_Name', 'status': 200, 'date': 'Tue, 16 Jan 2024 22:38:32 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': '397', 'content-type': 'application/json; charset=utf-8', 'connection': 'close', 'cookies_string': '', 'cookies': {}, 'msg': 'OK (397 bytes)'}",
        "TRACE: EXIT: send() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'policypatset_pattern_binding': [{'name': 'Placeholder_Name', 'String': 'existing_string1', 'index': '1', 'feature': 'SYSTEM'}, {'name': 'Placeholder_Name', 'String': 'existing_string2', 'index': '2', 'feature': 'SYSTEM'}, {'name': 'Placeholder_Name', 'String': 'existing_string3', 'index': '3', 'feature': 'SYSTEM'}]})",
        "TRACE: EXIT: get() returned (200, {'errorcode': 0, 'message': 'Done', 'severity': 'NONE', 'policypatset_pattern_binding': [{'name': 'Placeholder_Name', 'String': 'existing_string1', 'index': '1', 'feature': 'SYSTEM'}, {'name': 'Placeholder_Name', 'String': 'existing_string2', 'index': '2', 'feature': 'SYSTEM'}, {'name': 'Placeholder_Name', 'String': 'existing_string3', 'index': '3', 'feature': 'SYSTEM'}]})",
        "TRACE: EXIT: get_resource() returned [{'name': 'Placeholder_Name', 'String': 'existing_string1', 'index': '1', 'feature': 'SYSTEM'}, {'name': 'Placeholder_Name', 'String': 'existing_string2', 'index': '2', 'feature': 'SYSTEM'}, {'name': 'Placeholder_Name', 'String': 'existing_string3', 'index': '3', 'feature': 'SYSTEM'}]",
        "TRACE: EXIT: get_bindings() returned [{'name': 'Placeholder_Name', 'String': 'existing_string1', 'index': '1', 'feature': 'SYSTEM'}, {'name': 'Placeholder_Name', 'String': 'existing_string2', 'index': '2', 'feature': 'SYSTEM'}, {'name': 'Placeholder_Name', 'String': 'existing_string3', 'index': '3', 'feature': 'SYSTEM'}]",
        "DEBUG: Existing `policypatset_pattern_binding` bindings: [{'name': 'Placeholder_Name', 'String': 'existing_string1', 'index': '1', 'feature': 'SYSTEM'}, {'name': 'Placeholder_Name', 'String': 'existing_string2', 'index': '2', 'feature': 'SYSTEM'}, {'name': 'Placeholder_Name', 'String': 'existing_string3', 'index': '3', 'feature': 'SYSTEM'}]",
        "TRACE: ENTRY: return_failure() called with (<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor object at 0x7f5b0294c520>, \"Exception <class 'KeyError'>: 'string'\"), {}"
    ],
    "msg": "Exception <class 'KeyError'>: 'string'"
}

Additioinal Notes

The policypatset module itself works sans the pattern binding, but I can't seem to get binding members to cooperate. I'm following what is shown here: https://netscaler.github.io/ansible-collection-netscaleradc/collections/netscaler/adc/policypatset_module.html
https://galaxy.ansible.com/ui/repo/published/netscaler/adc/content/module/policypatset/
https://galaxy.ansible.com/ui/repo/published/netscaler/adc/content/module/policypatset_pattern_binding/

Nothing I've tried is working out. I've scoured around looking for examples to be sure I'm using proper keys in the binding_members section, but aside from looking at the Nitro API output and what's in https://galaxy.ansible.com/ui/repo/published/netscaler/adc/content/module/policypatset_pattern_binding/, I haven't had much luck. Maybe the issue is very simple.

One note is I know my creds are lacking in write authorization, but the error is very different when I run into that with other netscaler.adc modules I've been messing with.

@sumanth-lingappa
Copy link
Collaborator

sumanth-lingappa commented Jan 17, 2024

@sscottkeefe, thank you for raising the request.

Can you please help me with the workflow?
Do you have already a policypatset and then you are trying to bind pattern to the the existing policypatset?

If you could use NSCLI for your work, which commands would you use? This helps to reproduce the issue faster and give the fix quicker.

Thank you

@sscottkeefe
Copy link
Author

Correct, the policy already exists (e.g. "Placeholder_Name"). I'm just trying to add an additional pattern (e.g. "placeholder-dev.test.com") to the three that already exist. As I understand it, the CLI approach is:

bind policy patset Placeholder_Name placeholder-dev.test.com

I pulled that from a request I previously sent to our internal networking team that has been completed.

@sscottkeefe
Copy link
Author

I don't know how relevant this will be, but I've noticed that the module specific to the pattern binding does not return the KeyError, just an expected 403 error because of the user I'm using being read-only.

- name: Bind Policy Pattern
      netscaler.adc.policypatset_pattern_binding:
        nsip: '{{ netscaler_ip }}'
        nitro_user: '{{ netscaler_user }}'
        nitro_pass: '{{ netscaler_password }}'
        name: '{{ netscaler_policyname }}'
        string: '{{ netscaler_hostname }}'

sumanth-lingappa added a commit that referenced this issue Feb 8, 2024
NITRO was returning some keys with capitalised form.
Converted the keys to lowercase

Signed-off-by: Sumanth Lingappa <sumanth.lingappa@cloud.com>
sumanth-lingappa added a commit that referenced this issue Feb 8, 2024
Signed-off-by: Sumanth Lingappa <sumanth.lingappa@cloud.com>
@sumanth-lingappa
Copy link
Collaborator

Thank you for your further information.

This is fixed in the above PR. To download the latest unreleased netscaler.adc ansible collection -

ansible-galaxy collection install "git+https://github.com/netscaler/ansible-collection-netscaleradc.git" --force

@sscottkeefe
Copy link
Author

Thanks a lot, all looks well with the latest from Git. I also noticed errors when re-running with an existing pattern in the past with the policypatset_pattern_binding module, but that's also resolved.

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

2 participants