I expected it to create the location object. It doesn't.
```console (paste below)
changed: false
loglines:
- 'DEBUG: Initializing ModuleExecutor for resource location'
- >-
TRACE: ENTRY: common.get_valid_desired_states() called with ('location',),
{}
- >-
TRACE: EXIT: common.get_valid_desired_states() returned {'absent',
'present'}
- >-
TRACE: ENTRY: common.get_netscaler_version() called with
(<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient
object at 0x7ff8950d57f0>,), {}
- >-
TRACE: ENTRY: common.get_resource() called with
(<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient
object at 0x7ff8950d57f0>, '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 0x7ff8950d57f0>,), {'resource': 'nsversion', 'id': None, 'args':
{}}
- >-
TRACE: ENTRY: client.url_builder() called with
(<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient
object at 0x7ff8950d57f0>, 'nsversion'), {'id': None, 'args': {}, 'attrs':
None, 'filter': None}
- >-
TRACE: EXIT: client.url_builder() returned
https://INSERT_NSIP_HERE/nitro/v1/config/nsversion
- >-
TRACE: ENTRY: client.send() called with
(<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient
object at 0x7ff8950d57f0>, 'GET',
'https://INSERT_NSIP_HER/nitro/v1/config/nsversion'), {}
- >-
DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at
0x7ff8950d4980>, 'check_mode': False, 'api_path': 'nitro/v1/config',
'resource_name': 'location', '_headers': {'Content-Type':
'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER':
'********', 'X-NITRO-PASS': '********'}}
- >-
DEBUG: fetch_url()-resonse-info= GET: {'url':
'https://INSERT_NSIP_HERE/nitro/v1/config/nsversion', 'status': 200, 'date':
'Thu, 21 Aug 2025 22:01:10 GMT', '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 NS13.1: Build 59.19.nc, Date: Jun 18 2025, 16:36:16
(64-bit)', 'mode': '1'}})
- >-
TRACE: EXIT: client.get() returned (200, {'errorcode': 0, 'message': 'Done',
'severity': 'NONE', 'nsversion': {'installedversion': False, 'version':
'NetScaler NS13.1: Build 59.19.nc, Date: Jun 18 2025, 16:36:16 (64-bit)',
'mode': '1'}})
- >-
TRACE: ENTRY: common.fix_nitro_anomolies() called with ('nsversion', {},
[{'installedversion': False, 'version': 'NetScaler NS13.1: Build 59.19.nc,
Date: Jun 18 2025, 16:36:16 (64-bit)', 'mode': '1'}]), {}
- >-
TRACE: EXIT: common.fix_nitro_anomolies() returned [{'installedversion':
False, 'version': 'NetScaler NS13.1: Build 59.19.nc, Date: Jun 18 2025,
16:36:16 (64-bit)', 'mode': '1'}]
- >-
TRACE: EXIT: common.get_resource() returned (True, [{'installedversion':
False, 'version': 'NetScaler NS13.1: Build 59.19.nc, Date: Jun 18 2025,
16:36:16 (64-bit)', 'mode': '1'}])
- 'TRACE: EXIT: common.get_netscaler_version() returned (13.1, 59.19)'
- 'INFO: NetScaler version: 13.1-59.19'
- >-
DEBUG: All params (including non module-specific params) are: {'nsip':
'INSERT_NSIP_HERE', 'nitro_user': '********', 'nitro_pass': '********',
'nitro_protocol': 'https', 'validate_certs': False, 'save_config': False,
'state': 'present', 'ipto': '170.173.222.255', 'ipfrom': '170.173.217.0',
'preferredlocation': 'prov.WA.sdc.*.*.*', 'api_path': 'nitro/v1/config',
'netscaler_console_as_proxy_server': False, 'nitro_auth_token': None,
'managed_netscaler_instance_name': None, 'managed_netscaler_instance_ip':
None, 'managed_netscaler_instance_id': None,
'managed_netscaler_instance_username': None,
'managed_netscaler_instance_password': None, 'latitude': None, 'longitude':
None}
- >-
TRACE: ENTRY: module_executor._filter_resource_module_params() called with
(<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor
object at 0x7ff8950d4830>,), {}
- >-
DEBUG: self.module.params: {'nsip': 'INSERT_NSIP_HERE', 'nitro_user':
'********', 'nitro_pass': '********', 'nitro_protocol': 'https',
'validate_certs': False, 'save_config': False, 'state': 'present', 'ipto':
'170.173.222.255', 'ipfrom': '170.173.217.0', 'preferredlocation':
'prov.WA.sdc.*.*.*', 'api_path': 'nitro/v1/config',
'netscaler_console_as_proxy_server': False, 'nitro_auth_token': None,
'managed_netscaler_instance_name': None, 'managed_netscaler_instance_ip':
None, 'managed_netscaler_instance_id': None,
'managed_netscaler_instance_username': None,
'managed_netscaler_instance_password': None, 'latitude': None, 'longitude':
None}
- >-
DEBUG: Desired `location` module specific params are: {'ipto':
'170.173.222.255', 'ipfrom': '170.173.217.0', 'preferredlocation':
'prov.WA.sdc.*.*.*'}
- '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 0x7ff8950d4830>,), {}
- 'DEBUG: Desired `location` 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 0x7ff8950d4830>,), {}
- >-
TRACE: ENTRY: common.get_resource() called with
(<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient
object at 0x7ff8950d57f0>,), {'resource_name': 'location', 'resource_id':
'170.173.217.0', 'resource_module_params': {'ipto': '170.173.222.255',
'ipfrom': '170.173.217.0', 'preferredlocation': 'prov.WA.sdc.*.*.*'}}
- >-
TRACE: ENTRY: client.get() called with
(<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient
object at 0x7ff8950d57f0>,), {'resource': 'location', 'id': '170.173.217.0',
'args': {}}
- >-
TRACE: ENTRY: client.url_builder() called with
(<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient
object at 0x7ff8950d57f0>, 'location'), {'id': '170.173.217.0', 'args': {},
'attrs': None, 'filter': None}
- >-
TRACE: EXIT: client.url_builder() returned
https://INSERT_NSIP_HERE/nitro/v1/config/location/170.173.217.0
- >-
TRACE: ENTRY: client.send() called with
(<ansible_collections.netscaler.adc.plugins.module_utils.client.NitroAPIClient
object at 0x7ff8950d57f0>, 'GET',
'https://INSERT_NSIP_HERE/nitro/v1/config/location/170.173.217.0'), {}
- >-
DEBUG: self={'_module': <ansible.module_utils.basic.AnsibleModule object at
0x7ff8950d4980>, 'check_mode': False, 'api_path': 'nitro/v1/config',
'resource_name': 'location', '_headers': {'Content-Type':
'application/json', 'User-Agent': 'ansible-ctxadc', 'X-NITRO-USER':
'********', 'X-NITRO-PASS': '********'}}
- >-
DEBUG: fetch_url()-resonse-info= GET: {'url':
'https://INSERT_NSIP_HERE/nitro/v1/config/location/170.173.217.0', 'status':
200, 'date': 'Thu, 21 Aug 2025 22:01:10 GMT', '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': '343', 'content-type': 'application/json; charset=utf-8',
'connection': 'close', 'cookies_string': '', 'cookies': {}, 'msg': 'OK (343
bytes)'}
- >-
TRACE: EXIT: client.send() returned (200, {'errorcode': 0, 'message':
'Done', 'severity': 'NONE', 'location': [{'ipfrom': '170.173.128.0', 'ipto':
'170.173.255.255', 'preferredlocation': '*.US.Washington.*.Renton.*',
'q1label': 'Country', 'q2label': 'State', 'q3label': 'City', 'q4label':
'Facility', 'q5label': 'Other1', 'q6label': 'Other2', 'longitude': -122,
'latitude': 47}]})
- >-
TRACE: EXIT: client.get() returned (200, {'errorcode': 0, 'message': 'Done',
'severity': 'NONE', 'location': [{'ipfrom': '170.173.128.0', 'ipto':
'170.173.255.255', 'preferredlocation': '*.US.Washington.*.Renton.*',
'q1label': 'Country', 'q2label': 'State', 'q3label': 'City', 'q4label':
'Facility', 'q5label': 'Other1', 'q6label': 'Other2', 'longitude': -122,
'latitude': 47}]})
- >-
TRACE: ENTRY: common.fix_nitro_anomolies() called with ('location', {'ipto':
'170.173.222.255', 'ipfrom': '170.173.217.0', 'preferredlocation':
'prov.WA.sdc.*.*.*'}, [{'ipfrom': '170.173.128.0', 'ipto':
'170.173.255.255', 'preferredlocation': '*.US.Washington.*.Renton.*',
'q1label': 'Country', 'q2label': 'State', 'q3label': 'City', 'q4label':
'Facility', 'q5label': 'Other1', 'q6label': 'Other2', 'longitude': -122,
'latitude': 47}]), {}
- >-
TRACE: EXIT: common.fix_nitro_anomolies() returned [{'ipfrom':
'170.173.128.0', 'ipto': '170.173.255.255', 'preferredlocation':
'*.US.Washington.*.Renton.*', 'q1label': 'Country', 'q2label': 'State',
'q3label': 'City', 'q4label': 'Facility', 'q5label': 'Other1', 'q6label':
'Other2', 'longitude': -122, 'latitude': 47}]
- >-
TRACE: EXIT: common.get_resource() returned (True, [{'ipfrom':
'170.173.128.0', 'ipto': '170.173.255.255', 'preferredlocation':
'*.US.Washington.*.Renton.*', 'q1label': 'Country', 'q2label': 'State',
'q3label': 'City', 'q4label': 'Facility', 'q5label': 'Other1', 'q6label':
'Other2', 'longitude': -122, 'latitude': 47}])
- >-
TRACE: EXIT: module_executor.get_existing_resource() returned {'ipfrom':
'170.173.128.0', 'ipto': '170.173.255.255', 'preferredlocation':
'*.US.Washington.*.Renton.*', 'q1label': 'Country', 'q2label': 'State',
'q3label': 'City', 'q4label': 'Facility', 'q5label': 'Other1', 'q6label':
'Other2', 'longitude': -122, 'latitude': 47}
- >-
TRACE: ENTRY: module_executor.main() called with
(<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor
object at 0x7ff8950d4830>,), {}
- >-
TRACE: ENTRY: module_executor.create_or_update() called with
(<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor
object at 0x7ff8950d4830>,), {}
- >-
TRACE: ENTRY: module_executor.update_diff_list() called with
(<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor
object at 0x7ff8950d4830>,), {'existing': {'ipfrom': '170.173.128.0',
'ipto': '170.173.255.255', 'preferredlocation':
'*.US.Washington.*.Renton.*', 'q1label': 'Country', 'q2label': 'State',
'q3label': 'City', 'q4label': 'Facility', 'q5label': 'Other1', 'q6label':
'Other2', 'longitude': -122, 'latitude': 47}, 'desired': {'ipto':
'170.173.222.255', 'ipfrom': '170.173.217.0', 'preferredlocation':
'prov.WA.sdc.*.*.*'}}
- '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 0x7ff8950d4830>,), {}
- >-
TRACE: ENTRY: module_executor.is_attribute_equal() called with
(<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor
object at 0x7ff8950d4830>, 'ipto', '170.173.255.255', '170.173.222.255'), {}
- 'TRACE: EXIT: module_executor.is_attribute_equal() returned False'
- >-
DEBUG: Attribute `ipto` differs. Desired: (<class 'str'>) 170.173.222.255.
Existing: (<class 'str'>) 170.173.255.255
- >-
TRACE: ENTRY: module_executor.is_attribute_equal() called with
(<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor
object at 0x7ff8950d4830>, 'ipfrom', '170.173.128.0', '170.173.217.0'), {}
- 'TRACE: EXIT: module_executor.is_attribute_equal() returned False'
- >-
DEBUG: Attribute `ipfrom` differs. Desired: (<class 'str'>) 170.173.217.0.
Existing: (<class 'str'>) 170.173.128.0
- >-
TRACE: ENTRY: module_executor.is_attribute_equal() called with
(<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor
object at 0x7ff8950d4830>, 'preferredlocation',
'*.US.Washington.*.Renton.*', 'prov.WA.sdc.*.*.*'), {}
- 'TRACE: EXIT: module_executor.is_attribute_equal() returned False'
- >-
DEBUG: Attribute `preferredlocation` differs. Desired: (<class 'str'>)
prov.WA.sdc.*.*.*. Existing: (<class 'str'>) *.US.Washington.*.Renton.*
- >-
TRACE: EXIT: module_executor.is_resource_identical() returned (False,
['ipto', 'ipfrom', 'preferredlocation'])
- >-
TRACE: ENTRY: module_executor.is_resource_identical() called with
(<ansible_collections.netscaler.adc.plugins.module_utils.module_executor.ModuleExecutor
object at 0x7ff8950d4830>,), {}
- 'TRACE: EXIT: module_executor.is_resource_identical() returned (True, None)'
- >-
DEBUG: Resource location/170.173.217.0 not updated because user is trying to
update following non-updatable keys: ['ipto', 'ipfrom', 'preferredlocation']
invocation:
module_args:
nsip: INSERT_NSIP_HERE
nitro_user: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
nitro_pass: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
nitro_protocol: https
validate_certs: false
save_config: false
state: present
ipto: 170.173.222.255
ipfrom: 170.173.217.0
preferredlocation: prov.WA.sdc.*.*.*
api_path: nitro/v1/config
netscaler_console_as_proxy_server: false
nitro_auth_token: null
managed_netscaler_instance_name: null
managed_netscaler_instance_ip: null
managed_netscaler_instance_id: null
managed_netscaler_instance_username: null
managed_netscaler_instance_password: null
latitude: null
longitude: null
warnings:
- >-
Resource location/170.173.217.0 not updated because user is trying to update
following non-updatable keys: ['ipto', 'ipfrom', 'preferredlocation']
_ansible_no_log: false
gslb_location:
ipfrom: 170.173.217.0
ipto: 170.173.222.255
preferredlocation: prov.WA.sdc.*.*.*
ansible_loop_var: gslb_location
_ansible_item_label:
ipfrom: 170.173.217.0
ipto: 170.173.222.255
preferredlocation: prov.WA.sdc.*.*.*
_ansible_delegated_vars:
ansible_host: localhost
ansible_port: null
ansible_user: root
ansible_connection: local
Summary
When using the netscaler.adc.location module, if the IP range would override what is in the out of the box static location database (https://docs.netscaler.com/en-us/citrix-adc/current-release/global-server-load-balancing/configuring-static-proximity/add-a-location-file-create-static-proximity-db), it will fail to create the location. This should not occur, as it is possible to set this via CLI on the NetScaler, and the intended behavior is that this will override and take precedence over anything in the static location database (https://docs.netscaler.com/en-us/citrix-adc/current-release/global-server-load-balancing/configuring-static-proximity/add-custom-entries-static-proximity-db).
Issue Type
Bug Report
Component Name
location
Python Version
3.13.5Ansible Version
2.17.7Ansible Configuration
$ ansible-config dump --only-changednetscaler.adc Collection Version
2.9.2Target NetScaler Version
13.1.59.19Equivalent NetScaler CLI Command
add location 170.173.217.0 170.173.222.255 prov.WA.sdc.*.*.*Steps to Reproduce
Expected Results
I expected it to create the location object. It doesn't.
Actual Results