Comments (10)
Hello @MrBones757 , thank you for raising this issue. We will get back once analyzing this.
Thank you.
from ansible-collection-netscaleradc.
I might add that i have tried using the netscaler_* modules included with ansible and citrix_* modules from this repo with the same issue occuring in both scenarios.
from ansible-collection-netscaleradc.
Noted.
from ansible-collection-netscaleradc.
Just wondering if there was any update on this & if you were able to reproduce issues.
from ansible-collection-netscaleradc.
@MrBones757 The scenario is perfectly working: Please find below two ways to achieve this. Revert for any.
- hosts: citrix_adc
vars:
max_clients: 5
remote_user: root
gather_facts: False
tasks:
- name: Disable service group
delegate_to: localhost
citrix_adc_servicegroup:
nsip: "{{ nsip }}"
nitro_user: "{{ nitro_user }}"
nitro_pass: "{{ nitro_pass }}"
state: present
servicegroupname: test_svcgrp
disabled: yes
OR
- hosts: citrix_adc
gather_facts: no
tasks:
- name: Get resource
delegate_to: localhost
register: result
citrix_adc_nitro_request:
nsip: "{{ nsip }}"
nitro_user: "{{ nitro_user }}"
nitro_pass: "{{ nitro_pass }}"
operation: action
action: disable
resource: servicegroup
attributes:
servicegroupname: test_svcgrp
from ansible-collection-netscaleradc.
Hello,
Sorry for my slow reply.
I have re-verified this configuration and i am still not seeing this functioning. I have made sure i am using the most up to date version of the modules from this repo. Ansible verison is 2.7.5
The configuration used was:
- name: set_state | Toggle new connections to {{ im_netscaler_sg_name }}
citrix_adc_servicegroup:
nsip: "{{ ns_ip }}"
nitro_user: "{{ im_ad_username }}"
nitro_pass: "{{ im_ad_password }}"
state: present
servicegroupname: "{{ im_netscaler_sg_name }}"
disabled: yes
validate_certs: no
nitro_protocol: "https"
register: result_sg
delegate_to: localhost
Job Output:
{
"_ansible_parsed": true,
"_ansible_no_log": false,
"_ansible_delegated_vars": {
"ansible_delegated_host": "localhost",
"ansible_host": "localhost"
},
"changed": true,
"invocation": {
"module_args": {
"comment": null,
"tcpb": null,
"cachetype": null,
"save_config": true,
"disabled": true,
"nitro_protocol": "https",
"maxreq": null,
"maxbandwidth": null,
"graceful": null,
"svrtimeout": null,
"clttimeout": null,
"servicetype": null,
"monthreshold": null,
"autoscale": null,
"maxclient": null,
"monitorbindings": null,
"servicegroupname": "",
"state": "present",
"usip": null,
"nitro_user": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"netprofile": null,
"rtspsessionidremap": null,
"nitro_timeout": 310,
"pathmonitorindv": null,
"pathmonitor": null,
"appflowlog": null,
"servicemembers": null,
"cacheable": null,
"mas_proxy_call": false,
"memberport": null,
"instance_ip": null,
"cka": null,
"tcpprofilename": null,
"sp": null,
"downstateflush": null,
"cipheader": null,
"httpprofilename": null,
"nsip": "192.168.220.219",
"cip": null,
"healthmonitor": null,
"useproxyport": null,
"nitro_pass": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"nitro_auth_token": null,
"validate_certs": false,
"cmp": null
}
},
"loglines": [
"Applying actions for state present",
"Checking if service group exists",
"Servicegroup exists",
"Checking if service group is identical",
"Entering monitor_bindings_identical",
"Entering get_configured_monitor_bindings",
"Entering get_actual_monitor_bindings",
"Gettign actual monitor with name ",
"Entering sync_monitor_bindings",
"Entering get_actual_monitor_bindings",
"Gettign actual monitor with name ",
"Entering get_configured_monitor_bindings",
"servicemembers_identical",
"servicemembers [<nssrc.com.citrix.netscaler.nitro.resource.config.basic.servicegroup_servicegroupmember_binding.servicegroup_servicegroupmember_binding object at 0x7f5e1bfaed10>]",
"get_configured_service_members",
"Number of service group members 1",
"sync_service_members",
"get_configured_service_members",
"Disabling service",
"Sanity checks for state present",
"Checking if service group exists",
"Servicegroup exists",
"Checking if service group is identical",
"servicemembers_identical",
"servicemembers []",
"get_configured_service_members",
"Number of service group members 0",
"Entering monitor_bindings_identical",
"Entering get_configured_monitor_bindings",
"Entering get_actual_monitor_bindings"
]
}
Note all server and monitor configuration has disappeared.
Netscaler vpx version: NS11.1 58.13.nc
from ansible-collection-netscaleradc.
@MrBones757 , It is working well in my setup with NS11.1 build. Please allow me couple of days to revert back on this.
from ansible-collection-netscaleradc.
@MrBones757
We recently added the ssh_citrix_adc
connection plugin which allows you to use standard Ansbile modules with Citrix ADC.
With the use of the shell
Ansible module you can issue nscli
commands.
Disabling or enabling a servicegroup could be accomplished with the following playbooks
Disabling:
- hosts: citrix_adc
remote_user: nsroot
connection: ssh_citrix_adc
gather_facts: False
vars:
ansible_python_interpreter: /var/python/bin/python
tasks:
- name: Disable servicegroup test_service_group
shell: nscli -s -U :nsroot:nsroot "disable servicegroup test_service_group"
register: nscli_output
- name: Show nscli output
debug:
msg: "{{ nscli_output }}"
Enabling.
remote_user: nsroot
connection: ssh_citrix_adc
gather_facts: False
vars:
ansible_python_interpreter: /var/python/bin/python
tasks:
- name: Enable servicegroup test_service_group
shell: nscli -s -U :nsroot:nsroot "enable servicegroup test_service_group"
register: nscli_output
- name: Show nscli output
debug:
msg: "{{ nscli_output }}"
Make sure you have setup the connection plugin correctly as is detailed in this section of the README file.
Let us know if this works out for you.
from ansible-collection-netscaleradc.
Apologies for the slow reply.
Unfortunately this solution does not work in the setup implemented as we are using AD/LDAP logins to control access and permissions via the API/UI rather than directly accessing the command-line of the VPX instance.
I have done some research and found an alternative to the standard modules which use API calls to trigger actions on the netscaler. Using these i was able to create my own temporary solution to this issue until the underlying issue (?) with the provided modules can be determined.
from ansible-collection-netscaleradc.
Since you cannot access the nscli
I see the proposed solution cannot work.
Another alternative that skipped my mind is to use the citrix_adc_nitro_request
module to enable/disable the target servicegroup.
Here is a sample playbook that disables the test_service_group
- hosts: citrix_adc
gather_facts: False
vars:
tasks:
- name: Add Service
delegate_to: localhost
register: result
citrix_adc_nitro_request:
nsip: "{{ nsip }}"
nitro_user: "{{ nitro_user }}"
nitro_pass: "{{ nitro_pass }}"
operation: action
action: disable
resource: servicegroup
attributes:
servicegroupname: "test_service_group"
To enable the servicegroup use the same playbook with action: enable
We will be tracking this issue in our internal Jira to make sure we address this when we rewrite the servicegroup module.
from ansible-collection-netscaleradc.
Related Issues (20)
- [Bug]: unable to delete lbvserver (netscaler.adc 2.1.0) HOT 2
- [Bug]: lbmonitor (netscaler.adc 2.1.0) HOT 3
- [Bug]: service healthmonitor setting fails with incorrect type (netscaler.adc 2.1.0) HOT 2
- [FEATURE REQUEST]: save configuration module HOT 6
- [Bug]: can't delete servicegoup (2.1.0) HOT 3
- [FEATURE REQUEST]: restoring default values HOT 2
- [Bug]: dnsproxyrecords supports no state HOT 2
- [Bug]: unset netprofile gap? 2.3.0 HOT 1
- [Bug]: netscaler.adc.policypatset: policypatset_pattern_binding: binding_members returning "KeyError: string" error HOT 5
- [FEATURE-REQUEST]: `unset`ting of a param in `state:present` HOT 4
- [Bug]: Cipher Group recreating even if exists HOT 1
- [Help]: SSLCertKey link doesn't work with the new version HOT 1
- [Bug]: ERROR: Primary key `name` is missing for the resource `lbvserver_servicegroup_binding HOT 9
- [Bug]: systemglobal_authenticationtacacspolicy_binding module idempotency issue HOT 5
- [FEATURE REQUEST]: update tests to include ansible-2.14 and ansible-2.16
- [Bug]: hasync module missing state values
- [FEATURE REQUEST]: Update `requires_ansible` to 2.15 before May as Ansible Automation Platform 2.3 will reach its EoL
- [FEATURE REQUEST]: Support for GET, GET (All) and GET filtered operations on resources HOT 6
- [FEATURE REQUEST]: Do not fail on non-updatable module attributes HOT 6
- [FEATURE REQUEST]: Add resource dependency list to the nitro resource dependency map module util HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-collection-netscaleradc.