community / community.general / 0.1.1 / module / netscaler_cs_vserver Manage content switching vserver Authors: George Nikolopoulos (@giorgos-nikolopoulos) preview | supported by communitycommunity.general.netscaler_cs_vserver (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
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
# 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 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
td: description: - 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 ttl: description: - . - Minimum value = C(1) name: description: - Name for the content switching virtual server. Must begin with an ASCII alphanumeric or underscore C(_) character, and must contain only ASCII alphanumeric, underscore C(_), hash C(#), period C(.), space, colon C(:), at sign C(@), equal sign C(=), and hyphen C(-) characters. - Cannot be changed after the CS virtual server is created. - Minimum length = 1 nsip: description: - 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. required: true type: str port: description: - Port number for content switching virtual server. - Minimum value = 1 - Range C(1) - C(65535) - '* in CLI is represented as 65535 in NITRO API' push: choices: - enabled - disabled description: - 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 C(HTTP) or C(SSL). ipv46: description: - IP address of the content switching virtual server. - Minimum length = 1 range: description: - 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 = C(1) - Maximum value = C(254) state: choices: - absent - present default: present description: - 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. type: str ipmask: description: - IP mask, in dotted decimal notation, for the IP Pattern parameter. Can have leading or trailing non-zero octets (for example, C(255.255.240.0) or C(0.0.255.255)). Accordingly, the mask specifies whether the first n bits or the last n bits of the destination IP address in a client request are to be matched with the corresponding bits in the IP pattern. The former is called a forward mask. The latter is called a reverse mask. l2conn: description: - Use L2 Parameters to identify a connection. type: bool comment: description: - Information about this virtual server. rtspnat: description: - Enable network address translation (NAT) for real-time streaming protocol (RTSP) connections. type: bool authn401: description: - Enable HTTP 401-response based authentication. type: bool backupip: description: - . - Minimum length = 1 disabled: default: 'no' description: - When set to C(yes) the cs vserver will be disabled. - When set to C(no) the cs vserver will be enabled. - Note that due to limitations of the underlying NITRO API a C(disabled) state change alone does not cause the module result to report a changed status. type: bool rhistate: choices: - PASSIVE - ACTIVE description: - A host route is injected according to the setting on the virtual servers - '* If set to C(PASSIVE) on all the virtual servers that share the IP address, the appliance always injects the hostroute.' - '* If set to C(ACTIVE) on all the virtual servers that share the IP address, the appliance injects even if one virtual server is UP.' - '* If set to C(ACTIVE) on some virtual servers and C(PASSIVE) on the others, the appliance, injects even if one virtual server set to C(ACTIVE) is UP.' somethod: choices: - CONNECTION - DYNAMICCONNECTION - BANDWIDTH - HEALTH - NONE description: - 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. cacheable: description: - 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. type: bool ippattern: description: - 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 C(198.51.100.0) and the IP mask is C(255.255.240.0) (a forward mask), the first 20 bits in the destination IP addresses are matched with the first 20 bits in the pattern. The virtual server accepts requests with IP addresses that range from 198.51.96.1 to 198.51.111.254. You can also use a pattern such as C(0.0.2.2) and a mask such as C(0.0.255.255) (a reverse mask). - 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, C(vs1) and C(vs2), have the same IP pattern, C(0.0.100.128), but different IP masks of C(0.0.255.255) and C(0.0.224.255), a destination IP address of 198.51.100.128 has the longest match with the IP pattern of C(vs1). If a destination IP address matches two or more virtual servers to the same extent, the request is processed by the virtual server whose port number matches the port number in the request. lbvserver: description: - The default Load Balancing virtual server. pushlabel: description: - 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 C(HTTP) or C(SSL). vipheader: description: - Name of virtual server IP and port header, for use with the VServer IP Port Insertion parameter. - Minimum length = 1 appflowlog: choices: - enabled - disabled description: - Enable logging appflow flow information. clttimeout: description: - 'Idle time, in seconds, after which the client connection is terminated. The default values are:' - Minimum value = C(0) - Maximum value = C(31536000) domainname: description: - Domain name for which to change the time to live (TTL) and/or backup service IP address. - Minimum length = 1 netprofile: description: - The name of the network profile. - Minimum length = 1 - Maximum length = 127 nitro_pass: description: - The password with which to authenticate to the netscaler node. required: true type: str nitro_user: description: - The username with which to authenticate to the netscaler node. required: true type: str precedence: choices: - RULE - URL description: - Type of precedence to use for both RULE-based and URL-based policies on the content switching virtual server. With the default C(RULE) setting, incoming requests are evaluated against the rule-based content switching policies. If none of the rules match, the URL in the request is evaluated against the URL-based content switching policies. targettype: choices: - GSLB description: - Virtual server target type. authnvsname: description: - Name of authentication virtual server that authenticates the incoming user requests to this content switching virtual server. . - Minimum length = 1 - Maximum length = 252 pushvserver: description: - Name of the load balancing virtual server, of type C(PUSH) or C(SSL_PUSH), to which the server pushes updates received on the client-facing load balancing virtual server. - Minimum length = 1 redirecturl: description: - URL to which traffic is redirected if the virtual server becomes unavailable. The service type of the virtual server should be either C(HTTP) or C(SSL). - '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 save_config: default: true description: - If C(yes) the module will save the configuration on the netscaler node if it makes any changes. - The module will not save the configuration on the netscaler node if it made no changes. type: bool servicetype: choices: - HTTP - SSL - TCP - FTP - RTSP - SSL_TCP - UDP - DNS - SIP_UDP - SIP_TCP - SIP_SSL - ANY - RADIUS - RDP - MYSQL - MSSQL - DIAMETER - SSL_DIAMETER - DNS_TCP - ORACLE - SMPP description: - Protocol used by the virtual server. sothreshold: description: - 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 = C(1) - Maximum value = C(4294967287) ssl_certkey: description: - 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 M(netscaler_ssl_certkey) module. - This option is only applicable only when C(servicetype) is C(SSL). stateupdate: choices: - enabled - disabled description: - '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. authnprofile: description: - Name of the authentication profile to be used when authentication is turned on. cookiedomain: description: - . - Minimum length = 1 listenpolicy: description: - 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. backupvserver: description: - Name of the backup virtual server that you are configuring. Must begin with an ASCII alphanumeric or underscore C(_) character, and must contain only ASCII alphanumeric, underscore C(_), hash C(#), period C(.), space C( ), colon C(:), at sign C(@), equal sign C(=), and hyphen C(-) characters. Can be changed after the backup virtual server is created. You can assign a different backup virtual server or rename the existing virtual server. - Minimum length = 1 casesensitive: description: - Consider case in URLs (for policies that use URLs instead of RULES). For example, with the C(on) setting, the URLs /a/1.html and /A/1.HTML are treated differently and can have different targets (set by content switching policies). With the C(off) setting, /a/1.html and /A/1.HTML are switched to the same target. type: bool cookietimeout: description: - . - Minimum value = C(0) - Maximum value = C(1440) dbprofilename: description: - Name of the DB profile. - Minimum length = 1 - Maximum length = 127 nitro_timeout: default: 310 description: - Time in seconds until a timeout error is thrown when establishing a new session with Netscaler type: float sitedomainttl: description: - . - Minimum value = C(1) sopersistence: choices: - enabled - disabled description: - Maintain source-IP based persistence on primary and backup virtual servers. authentication: description: - Authenticate users who request a connection to the content switching virtual server. type: bool dnsprofilename: description: - 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 downstateflush: choices: - enabled - disabled description: - 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. nitro_protocol: choices: - http - https default: http description: - Which protocol to use when accessing the nitro API objects. type: str sobackupaction: choices: - DROP - ACCEPT - REDIRECT description: - Action to be performed if spillover is to take effect, but no backup chain to spillover is usable or exists. tcpprofilename: description: - Name of the TCP profile containing TCP configuration settings for the virtual server. - Minimum length = 1 - Maximum length = 127 validate_certs: default: true description: - If C(no), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. type: bool httpprofilename: description: - Name of the HTTP profile containing HTTP configuration settings for the virtual server. The service type of the virtual server should be either C(HTTP) or C(SSL). - Minimum length = 1 - Maximum length = 127 icmpvsrresponse: choices: - PASSIVE - ACTIVE description: - Can be active or passive. pushmulticlients: description: - Allow multiple Web 2.0 connections from the same client to connect to the virtual server and expect updates. type: bool mysqlcharacterset: description: - The character set returned by the mysql vserver. authenticationhost: description: - FQDN of the authentication virtual server. The service type of the virtual server should be either C(HTTP) or C(SSL). - Minimum length = 3 - Maximum length = 252 mssqlserverversion: choices: - '70' - '2000' - 2000SP1 - '2005' - '2008' - 2008R2 - '2012' - '2014' description: - The version of the MSSQL server. mysqlserverversion: description: - The server version string returned by the mysql vserver. - Minimum length = 1 - Maximum length = 31 insertvserveripport: choices: - 'OFF' - VIPADDR - V6TOV4MAPPING description: - 'Insert the virtual server''s VIP address and port number in the request header. Available values function as follows:' - C(VIPADDR) - Header contains the vserver's IP address and port number without any translation. - C(OFF) - The virtual IP and port header insertion option is disabled. - C(V6TOV4MAPPING) - Header contains the mapped IPv4 address corresponding to the IPv6 address of the vserver and the port number. An IPv6 address can be mapped to a user-specified IPv4 address using the set ns ip6 command. oracleserverversion: choices: - 10G - 11G description: - Oracle server version. redirectportrewrite: choices: - enabled - disabled description: - State of port rewrite while performing HTTP redirect. disableprimaryondown: choices: - enabled - disabled description: - Continue forwarding the traffic to backup virtual server even after the primary server comes UP from the DOWN state. mysqlprotocolversion: description: - The protocol version returned by the mysql vserver. sopersistencetimeout: description: - Time-out value, in minutes, for spillover persistence. - Minimum value = C(2) - Maximum value = C(1440) mysqlservercapabilities: description: - The server capabilities returned by the mysql vserver.
diff: description: List of differences between the actual configured object and the configuration specified in the module returned: failure sample: clttimeout: 'difference. ours: (float) 100.0 other: (float) 60.0' type: dict loglines: description: list of logged messages by the module returned: always sample: - message 1 - message 2 type: list msg: description: Message detailing the failure reason returned: failure sample: Action does not exist type: str