community.network.netscaler_servicegroup module – Manage service group configuration in Netscaler
Note
This module is part of the community.network collection (version 5.0.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.network
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.network.netscaler_servicegroup
.
Synopsis
Manage service group configuration in Netscaler.
This module is intended to run either on the ansible control node or a bastion (jumpserver) with access to the actual netscaler instance.
Requirements
The below requirements are needed on the host that executes this module.
nitro python sdk
Parameters
Parameter |
Comments |
---|---|
Enable logging of AppFlow information for the specified service group. Choices:
|
|
Auto scale option for a servicegroup. Choices:
|
|
Use the transparent cache redirection virtual server to forward the request to the cache server. Note: Do not set this parameter if you set the Cache Type. Choices:
|
|
Cache type supported by the cache server. Choices:
|
|
Insert the Client IP header in requests forwarded to the service. Choices:
|
|
Name of the HTTP header whose value must be set to the IP address of the client. Used with the Client IP parameter. If client IP insertion is enabled, and the client IP header is not specified, the value of Client IP Header parameter or the value set by the set ns config command is used as client’s IP header name. Minimum length = 1 |
|
Enable client keep-alive for the service group. Choices:
|
|
Time, in seconds, after which to terminate an idle client connection. Minimum value = Maximum value = |
|
Enable compression for the specified service. Choices:
|
|
Any information about the service group. |
|
When set to When set to Note that due to limitations of the underlying NITRO API a Choices:
|
|
Flush all active transactions associated with all the services in the service group whose state transitions from UP to DOWN. Do not enable this option for applications that must complete their transactions. Choices:
|
|
Wait for all existing connections to the service to terminate before shutting down the service. Choices:
|
|
Monitor the health of this service. Available settings function as follows:
Choices:
|
|
Name of the HTTP profile that contains HTTP configuration settings for the service group. Minimum length = 1 Maximum length = 127 |
|
Maximum bandwidth, in Kbps, allocated for all the services in the service group. Minimum value = Maximum value = |
|
Maximum number of simultaneous open connections for the service group. Minimum value = Maximum value = |
|
Maximum number of requests that can be sent on a persistent connection to the service group. Note: Connection requests beyond this value are rejected. Minimum value = Maximum value = |
|
member port. |
|
A list of monitornames to bind to this service Note that the monitors must have already been setup possibly using the community.network.netscaler_lb_monitor module or some other method |
|
The monitor name to bind to this servicegroup. |
|
Weight to assign to the binding between the monitor and servicegroup. |
|
Minimum sum of weights of the monitors that are bound to this service. Used to determine whether to mark a service as UP or DOWN. Minimum value = Maximum value = |
|
Network profile for the service group. Minimum length = 1 Maximum length = 127 |
|
The password with which to authenticate to the netscaler node. |
|
Which protocol to use when accessing the nitro API objects. Choices:
|
|
Time in seconds until a timeout error is thrown when establishing a new session with Netscaler Default: |
|
The username with which to authenticate to the netscaler node. |
|
The ip address of the netscaler appliance where the nitro API calls will be made. The port can be specified with the colon (:). E.g. 192.168.1.1:555. |
|
Path monitoring for clustering. Choices:
|
|
Individual Path monitoring decisions. Choices:
|
|
Enable RTSP session ID mapping for the service group. Choices:
|
|
If The module will not save the configuration on the netscaler node if it made no changes. Choices:
|
|
Name of the service group. Must begin with an ASCII alphabetic or underscore Minimum length = 1 |
|
A list of dictionaries describing each service member of the service group. |
|
The identifier for this IP:Port pair. Used when the persistency type is set to Custom Server ID. |
|
The hash identifier for the service. This must be unique for each service. This parameter is used by hash based load balancing methods. Minimum value = |
|
IP address of the service. Must not overlap with an existing server entity defined by name. |
|
Server port number. Range * in CLI is represented as 65535 in NITRO API |
|
The identifier for the service. This is used when the persistency type is set to Custom Server ID. |
|
Name of the server to which to bind the service group. The server must already be configured as a named server. Minimum length = 1 |
|
Initial state of the service after binding. Choices:
|
|
Weight to assign to the servers in the service group. Specifies the capacity of the servers relative to the other servers in the load balancing configuration. The higher the weight, the higher the percentage of requests sent to the service. Minimum value = Maximum value = |
|
Protocol used to exchange data with the service. Choices:
|
|
Enable surge protection for the service group. Choices:
|
|
The state of the resource being configured by the module on the netscaler node. When present the resource will be created if needed and configured according to the module’s parameters. When absent the resource will be deleted from the netscaler node. Choices:
|
|
Time, in seconds, after which to terminate an idle server connection. Minimum value = Maximum value = |
|
Enable TCP buffering for the service group. Choices:
|
|
Name of the TCP profile that contains TCP configuration settings for the service group. Minimum length = 1 Maximum length = 127 |
|
Use the proxy port as the source port when initiating connections with the server. With the NO setting, the client-side connection port is used as the source port for the server-side connection. Note: This parameter is available only when the Use Source IP Choices:
|
|
Use client’s IP address as the source IP address when initiating connection to the server. With the NO setting, which is the default, a mapped IP (MIP) address or subnet IP (SNIP) address is used as the source IP address to initiate server side connections. Choices:
|
|
If Choices:
|
Notes
Note
For more information on using Ansible to manage Citrix NetScaler Network devices see https://www.ansible.com/ansible-netscaler.
Examples
# The LB Monitors monitor-1 and monitor-2 must already exist
# Service members defined by C(ip) must not redefine an existing server's ip address.
# Service members defined by C(servername) must already exist.
- name: Setup http service with ip members
delegate_to: localhost
community.network.netscaler_servicegroup:
nsip: 172.18.0.2
nitro_user: nsroot
nitro_pass: nsroot
state: present
servicegroupname: service-group-1
servicetype: HTTP
servicemembers:
- ip: 10.78.78.78
port: 80
weight: 50
- ip: 10.79.79.79
port: 80
weight: 40
- servername: server-1
port: 80
weight: 10
monitorbindings:
- monitorname: monitor-1
weight: 50
- monitorname: monitor-2
weight: 50
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
List of differences between the actual configured object and the configuration specified in the module Returned: failure Sample: |
|
list of logged messages by the module Returned: always Sample: |
|
Message detailing the failure reason Returned: failure Sample: |