community.network.netscaler_cs_vserver module – Manage content switching vserver
Note
This module is part of the community.network collection (version 4.0.2).
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_cs_vserver
.
Synopsis
Manage content switching vserver
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 appflow flow information. Choices:
|
|
Authenticate users who request a connection to the content switching virtual server. Choices:
|
|
FQDN of the authentication virtual server. The service type of the virtual server should be either Minimum length = 3 Maximum length = 252 |
|
Enable HTTP 401-response based authentication. Choices:
|
|
Name of the authentication profile to be used when authentication is turned on. |
|
Name of authentication virtual server that authenticates the incoming user requests to this content switching virtual server. . Minimum length = 1 Maximum length = 252 |
|
. Minimum length = 1 |
|
Name of the backup virtual server that you are configuring. Must begin with an ASCII alphanumeric or underscore Minimum length = 1 |
|
Use this option to specify whether a virtual server, used for load balancing or content switching, routes requests to the cache redirection virtual server before sending it to the configured servers. Choices:
|
|
Consider case in URLs (for policies that use URLs instead of RULES). For example, with the Choices:
|
|
Idle time, in seconds, after which the client connection is terminated. The default values are: Minimum value = Maximum value = |
|
Information about this virtual server. |
|
. Minimum length = 1 |
|
. Minimum value = Maximum value = |
|
Name of the DB profile. Minimum length = 1 Maximum length = 127 |
|
When set to When set to Note that due to limitations of the underlying NITRO API a Choices:
|
|
Continue forwarding the traffic to backup virtual server even after the primary server comes UP from the DOWN state. Choices:
|
|
Name of the DNS profile to be associated with the VServer. DNS profile properties will applied to the transactions processed by a VServer. This parameter is valid only for DNS and DNS-TCP VServers. Minimum length = 1 Maximum length = 127 |
|
Domain name for which to change the time to live (TTL) and/or backup service IP address. Minimum length = 1 |
|
Flush all active transactions associated with a virtual server whose state transitions from UP to DOWN. Do not enable this option for applications that must complete their transactions. Choices:
|
|
Name of the HTTP profile containing HTTP configuration settings for the virtual server. The service type of the virtual server should be either Minimum length = 1 Maximum length = 127 |
|
Can be active or passive. Choices:
|
|
Insert the virtual server’s VIP address and port number in the request header. Available values function as follows:
Choices:
|
|
IP mask, in dotted decimal notation, for the IP Pattern parameter. Can have leading or trailing non-zero octets (for example, |
|
IP address pattern, in dotted decimal notation, for identifying packets to be accepted by the virtual server. The IP Mask parameter specifies which part of the destination IP address is matched against the pattern. Mutually exclusive with the IP Address parameter. For example, if the IP pattern assigned to the virtual server is If a destination IP address matches more than one IP pattern, the pattern with the longest match is selected, and the associated virtual server processes the request. For example, if the virtual servers, |
|
IP address of the content switching virtual server. Minimum length = 1 |
|
Use L2 Parameters to identify a connection. Choices:
|
|
The default Load Balancing virtual server. |
|
String specifying the listen policy for the content switching virtual server. Can be either the name of an existing expression or an in-line expression. |
|
The version of the MSSQL server. Choices:
|
|
The character set returned by the mysql vserver. |
|
The protocol version returned by the mysql vserver. |
|
The server capabilities returned by the mysql vserver. |
|
The server version string returned by the mysql vserver. Minimum length = 1 Maximum length = 31 |
|
Name for the content switching virtual server. Must begin with an ASCII alphanumeric or underscore Cannot be changed after the CS virtual server is created. Minimum length = 1 |
|
The name of the network profile. 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. |
|
Oracle server version. Choices:
|
|
Port number for content switching virtual server. Minimum value = 1 Range * in CLI is represented as 65535 in NITRO API |
|
Type of precedence to use for both RULE-based and URL-based policies on the content switching virtual server. With the default Choices:
|
|
Process traffic with the push virtual server that is bound to this content switching virtual server (specified by the Push VServer parameter). The service type of the push virtual server should be either Choices:
|
|
Expression for extracting the label from the response received from server. This string can be either an existing rule name or an inline expression. The service type of the virtual server should be either |
|
Allow multiple Web 2.0 connections from the same client to connect to the virtual server and expect updates. Choices:
|
|
Name of the load balancing virtual server, of type Minimum length = 1 |
|
Number of consecutive IP addresses, starting with the address specified by the IP Address parameter, to include in a range of addresses assigned to this virtual server. Minimum value = Maximum value = |
|
State of port rewrite while performing HTTP redirect. Choices:
|
|
URL to which traffic is redirected if the virtual server becomes unavailable. The service type of the virtual server should be either Caution: Make sure that the domain in the URL does not match the domain specified for a content switching policy. If it does, requests are continuously redirected to the unavailable virtual server. Minimum length = 1 |
|
A host route is injected according to the setting on the virtual servers * If set to * If set to * If set to Choices:
|
|
Enable network address translation (NAT) for real-time streaming protocol (RTSP) connections. Choices:
|
|
If The module will not save the configuration on the netscaler node if it made no changes. Choices:
|
|
Protocol used by the virtual server. Choices:
|
|
. Minimum value = |
|
Action to be performed if spillover is to take effect, but no backup chain to spillover is usable or exists. Choices:
|
|
Type of spillover used to divert traffic to the backup virtual server when the primary virtual server reaches the spillover threshold. Connection spillover is based on the number of connections. Bandwidth spillover is based on the total Kbps of incoming and outgoing traffic. Choices:
|
|
Maintain source-IP based persistence on primary and backup virtual servers. Choices:
|
|
Time-out value, in minutes, for spillover persistence. Minimum value = Maximum value = |
|
Depending on the spillover method, the maximum number of connections or the maximum total bandwidth (Kbps) that a virtual server can handle before spillover occurs. Minimum value = Maximum value = |
|
The name of the ssl certificate that is bound to this service. The ssl certificate must already exist. Creating the certificate can be done with the community.network.netscaler_ssl_certkey module. This option is only applicable only when |
|
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:
|
|
Enable state updates for a specific content switching virtual server. By default, the Content Switching virtual server is always UP, regardless of the state of the Load Balancing virtual servers bound to it. This parameter interacts with the global setting as follows: Global Level | Vserver Level | Result enabled enabled enabled enabled disabled enabled disabled enabled enabled disabled disabled disabled If you want to enable state updates for only some content switching virtual servers, be sure to disable the state update parameter. Choices:
|
|
Virtual server target type. Choices:
|
|
Name of the TCP profile containing TCP configuration settings for the virtual server. Minimum length = 1 Maximum length = 127 |
|
Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0. Minimum value = 0 Maximum value = 4094 |
|
. Minimum value = |
|
If Choices:
|
|
Name of virtual server IP and port header, for use with the VServer IP Port Insertion parameter. Minimum length = 1 |
Notes
Note
For more information on using Ansible to manage Citrix NetScaler Network devices see https://www.ansible.com/ansible-netscaler.
Examples
# policy_1 must have been already created with the netscaler_cs_policy module
# lbvserver_1 must have been already created with the netscaler_lb_vserver module
- name: Setup content switching vserver
delegate_to: localhost
community.network.netscaler_cs_vserver:
nsip: 172.18.0.2
nitro_user: nsroot
nitro_pass: nsroot
state: present
name: cs_vserver_1
ipv46: 192.168.1.1
port: 80
servicetype: HTTP
policybindings:
- policyname: policy_1
targetlbvserver: lbvserver_1
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: |