We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When trying to use netscaler.adc.nspartition to switch my session to custom partition like this:
name: switch to partition {{ provider.partitionname }} delegate_to: localhost netscaler.adc.nspartition: nsip: "{{ provider.nsip }}" nitro_auth_token: "{{ provider.nitro_auth_token | default(omit) }}" nitro_protocol: "{{ provider.nitro_protocol | default(omit) }}" validate_certs: "{{ provider.validate_certs | default(omit) }}" partitionname: "{{ provider.partitionname }}" check_mode: false
netscaler.adc.nspartition is making changes to the partition, instead of simply switching my session:
... => { "changed": true, "diff_list": [ "Attribute maxbandwidth differs. Desired: (<class 'float'>) 10240.0. Existing: (<class 'str'>) 4500000", "Attribute maxconn differs. Desired: (<class 'float'>) 1024.0. Existing: (<class 'str'>) 0", "Attribute maxmemlimit differs. Desired: (<class 'float'>) 10.0. Existing: (<class 'int'>) 0", "Attribute minbandwidth differs. Desired: (<class 'float'>) 10240.0. Existing: (<class 'NoneType'>) None" ],
maxbandwidth
maxconn
maxmemlimit
minbandwidth
I'm not sure if this is a bug in this module, or it works as expected but the netscaler.adc.login is missing option to login to specific partition.
Bug Report
netscaler.adc.nspartition or netscaler.adc.login
$ python3 --version Python 3.9.5
$ ansible --version ansible [core 2.15.6] config file = None configured module search path = ['/home/pkodzis/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/pkodzis/.local/lib/python3.9/site-packages/ansible ansible collection location = /home/pkodzis/.ansible/collections:/usr/share/ansible/collections executable location = /usr/local/bin/ansible python version = 3.9.5 (default, Nov 18 2021, 16:00:48) [GCC 10.3.0] (/usr/bin/python3) jinja version = 3.1.2 libyaml = True
$ ansible-config dump --only-changed CONFIG_FILE() = None
$ ansible-galaxy collection list netscaler.adc # /home/pkodzis/.ansible/collections/ansible_collections Collection Version ------------- ------- netscaler.adc 2.0.3
> show ns version NetScaler NS13.1: Build 42.47.nc, Date: Feb 22 2023, 08:08:13
sw par <partition name>
- name: login to NetScaler delegate_to: localhost netscaler.adc.login: nsip: "{{ nsip }}" username: "{{ username }}" password: "{{ password }}" nitro_protocol: https validate_certs: no check_mode: false register: result - name: setup provider set_fact: provider: nitro_auth_token: "{{ result.sessionid }}" nsip: "{{ nsip }}" validate_certs: "{{ provider_defaults.validate_certs }}" partitionname: "{{ provider_defaults.partitionname }}" comment: "{{ provider_defaults.comment }}" - debug: var: provider - name: switch to partition {{ provider.partitionname }} delegate_to: localhost netscaler.adc.nspartition: nsip: "{{ provider.nsip }}" nitro_auth_token: "{{ provider.nitro_auth_token | default(omit) }}" nitro_protocol: "{{ provider.nitro_protocol | default(omit) }}" validate_certs: "{{ provider.validate_certs | default(omit) }}" partitionname: "{{ provider.partitionname }}" check_mode: false register: result - debug: var: result
session related to nitro_auth_token switched to partition without making any changes
modified partition limits => catastrofic behavior for PROD... ... => { "changed": true, "diff_list": [ "Attribute `maxbandwidth` differs. Desired: (<class 'float'>) 10240.0. Existing: (<class 'str'>) 4500000", "Attribute `maxconn` differs. Desired: (<class 'float'>) 1024.0. Existing: (<class 'str'>) 0", "Attribute `maxmemlimit` differs. Desired: (<class 'float'>) 10.0. Existing: (<class 'int'>) 0", "Attribute `minbandwidth` differs. Desired: (<class 'float'>) 10240.0. Existing: (<class 'NoneType'>) None" ],
No response
The text was updated successfully, but these errors were encountered:
Fixed in version 2.3.0
A new state switched is introduced.
switched
Example can be found here HERE
For more details, you can refer PR #342
Sorry, something went wrong.
ack, works as expected - thank you so much! :)
sumanth-lingappa
No branches or pull requests
Summary
When trying to use netscaler.adc.nspartition to switch my session to custom partition like this:
name: switch to partition {{ provider.partitionname }}
delegate_to: localhost
netscaler.adc.nspartition:
nsip: "{{ provider.nsip }}"
nitro_auth_token: "{{ provider.nitro_auth_token | default(omit) }}"
nitro_protocol: "{{ provider.nitro_protocol | default(omit) }}"
validate_certs: "{{ provider.validate_certs | default(omit) }}"
partitionname: "{{ provider.partitionname }}"
check_mode: false
netscaler.adc.nspartition is making changes to the partition, instead of simply switching my session:
... => {
"changed": true,
"diff_list": [
"Attribute
maxbandwidth
differs. Desired: (<class 'float'>) 10240.0. Existing: (<class 'str'>) 4500000","Attribute
maxconn
differs. Desired: (<class 'float'>) 1024.0. Existing: (<class 'str'>) 0","Attribute
maxmemlimit
differs. Desired: (<class 'float'>) 10.0. Existing: (<class 'int'>) 0","Attribute
minbandwidth
differs. Desired: (<class 'float'>) 10240.0. Existing: (<class 'NoneType'>) None"],
I'm not sure if this is a bug in this module, or it works as expected but the netscaler.adc.login is missing option to login to specific partition.
Issue Type
Bug Report
Component Name
netscaler.adc.nspartition or netscaler.adc.login
Python Version
Ansible Version
Ansible Configuration
netscaler.adc Collection Version
Target NetScaler Version
Equivalent NetScaler CLI Command
sw par <partition name>
Steps to Reproduce
Expected Results
session related to nitro_auth_token switched to partition without making any changes
Actual Results
Additioinal Notes
No response
The text was updated successfully, but these errors were encountered: