netscaler.adc.cachecontentgroup module – Configuration for Integrated Cache content group resource.

Note

This module is part of the netscaler.adc collection (version 2.6.0).

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 netscaler.adc.

To use it in a playbook, specify: netscaler.adc.cachecontentgroup.

New in netscaler.adc 2.0.0

Synopsis

  • Configuration for Integrated Cache content group resource.

Parameters

Parameter

Comments

absexpiry

any

Local time, up to 4 times a day, at which all objects in the content group must expire.

CLI Users:

For example, to specify that the objects in the content group should expire by 11:00 PM, type the following command: add cache contentgroup <contentgroup name> -absexpiry 23:00

To specify that the objects in the content group should expire at 10:00 AM, 3 PM, 6 PM, and 11:00 PM, type: add cache contentgroup <contentgroup name> -absexpiry 10:00 15:00 18:00 23:00

absexpirygmt

any

Coordinated Universal Time (GMT), up to 4 times a day, when all objects in the content group must expire.

alwaysevalpolicies

any

Force policy evaluation for each response arriving from the origin server. Cannot be set to YES if the Prefetch parameter is also set to YES.

Choices:

  • "YES"

  • "NO"

api_path

string

Base NITRO API path.

Define only in case of an ADM service proxy call

Default: "nitro/v1/config"

cachecontrol

any

Insert a Cache-Control header into the response.

expireatlastbyte

any

Force expiration of the content immediately after the response is downloaded (upon receipt of the last byte of the response body). Applicable only to positive responses.

Choices:

  • "YES"

  • "NO"

flashcache

any

Perform flash cache. Mutually exclusive with Poll Every Time (PET) on the same content group.

Choices:

  • "YES"

  • "NO"

heurexpiryparam

any

Heuristic expiry time, in percent of the duration, since the object was last modified.

hitparams

any

Parameters to use for parameterized hit evaluation of an object. Up to 128 parameters can be specified. Mutually exclusive with the Hit Selector parameter.

hitselector

any

Selector for evaluating whether an object gets stored in a particular content group. A selector is an abstraction for a collection of PIXL expressions.

host

string

Flush only objects that belong to the specified host. Do not use except with parameterized invalidation. Also, the Invalidation Restricted to Host parameter for the group must be set to YES.

ignoreparamvaluecase

any

Ignore case when comparing parameter values during parameterized hit evaluation. (Parameter value case is ignored by default during parameterized invalidation.)

Choices:

  • "YES"

  • "NO"

ignorereloadreq

any

Ignore any request to reload a cached object from the origin server.

To guard against Denial of Service attacks, set this parameter to YES. For RFC-compliant behavior, set it to NO.

Choices:

  • "YES"

  • "NO"

ignorereqcachinghdrs

any

Ignore Cache-Control and Pragma headers in the incoming request.

Choices:

  • "YES"

  • "NO"

insertage

any

Insert an Age header into the response. An Age header contains information about the age of the object, in seconds, as calculated by the integrated cache.

Choices:

  • "YES"

  • "NO"

insertetag

any

Insert an ETag header in the response. With ETag header insertion, the integrated cache does not serve full responses on repeat requests.

Choices:

  • "YES"

  • "NO"

insertvia

any

Insert a Via header into the response.

Choices:

  • "YES"

  • "NO"

invalparams

any

Parameters for parameterized invalidation of an object. You can specify up to 8 parameters. Mutually exclusive with invalSelector.

invalrestrictedtohost

any

Take the host header into account during parameterized invalidation.

Choices:

  • "YES"

  • "NO"

invalselector

any

Selector for invalidating objects in the content group. A selector is an abstraction for a collection of PIXL expressions.

lazydnsresolve

any

Perform DNS resolution for responses only if the destination IP address in the request does not match the destination IP address of the cached response.

Choices:

  • "YES"

  • "NO"

managed_netscaler_instance_id

string

added in netscaler.adc 2.6.0

The ID of the managed NetScaler instance to which NetScaler Console

has to configure as a proxy server.

Define only in case of an ADM service proxy call

managed_netscaler_instance_ip

string

added in netscaler.adc 2.6.0

The IP of the managed NetScaler instance to which NetScaler Console

has to configure as a proxy server.

Define only in case of an ADM service proxy call

managed_netscaler_instance_name

string

added in netscaler.adc 2.6.0

The name of the managed NetScaler instance to which NetScaler Console

has to configure as a proxy server.

Define only in case of an ADM service proxy call

managed_netscaler_instance_password

string

added in netscaler.adc 2.6.0

The password of the managed NetScaler instance.

Define only in case of an ADM service proxy call

In Settings > Administration > System Configurations > Basic Settings,

if you select Prompt Credentials for Instance Login,

ensure to configure username and password of a managed instance.

managed_netscaler_instance_username

string

added in netscaler.adc 2.6.0

The username of the managed NetScaler instance.

Define only in case of an ADM service proxy call

In Settings > Administration > System Configurations > Basic Settings,

if you select Prompt Credentials for Instance Login,

ensure to configure username and password of a managed instance.

matchcookies

any

Evaluate for parameters in the cookie header also.

Choices:

  • "YES"

  • "NO"

maxressize

any

Maximum size of a response that can be cached in this content group.

memlimit

any

Maximum amount of memory that the cache can use. The effective limit is based on the available memory of the Citrix ADC.

minhits

any

Number of hits that qualifies a response for storage in this content group.

minressize

any

Minimum size of a response that can be cached in this content group.

Default minimum response size is 0.

name

any

Name for the content group. Must begin with an ASCII alphabetic or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the content group is created.

netscaler_console_as_proxy_server

boolean

added in netscaler.adc 2.6.0

The IP address of the NetScaler ADC appliance acting as a proxy server.

Define only in case of an ADM service proxy call

Choices:

  • false ← (default)

  • true

nitro_auth_token

string

The authentication token provided by a login operation.

nitro_pass

string

The password with which to authenticate to the NetScaler ADC node.

nitro_protocol

string

Which protocol to use when accessing the nitro API objects.

Choices:

  • "http"

  • "https" ← (default)

nitro_user

string

The username with which to authenticate to the NetScaler ADC node.

nsip

string / required

The ip address of the NetScaler ADC appliance where the nitro API calls will be made.

The port can be specified with the colon (:). E.g. 192.168.1.1:555.

persistha

any

Setting persistHA to YES causes IC to save objects in contentgroup to Secondary node in HA deployment.

Choices:

  • "YES"

  • "NO"

pinned

any

Do not flush objects from this content group under memory pressure.

Choices:

  • "YES"

  • "NO"

polleverytime

any

Always poll for the objects in this content group. That is, retrieve the objects from the origin server whenever they are requested.

Choices:

  • "YES"

  • "NO"

prefetch

any

Attempt to refresh objects that are about to go stale.

Choices:

  • "YES"

  • "NO"

prefetchmaxpending

any

Maximum number of outstanding prefetches that can be queued for the content group.

prefetchperiod

any

Time period, in seconds before an object’s calculated expiry time, during which to attempt prefetch.

prefetchperiodmillisec

any

Time period, in milliseconds before an object’s calculated expiry time, during which to attempt prefetch.

query

string

Query string specifying individual objects to flush from this group by using parameterized invalidation. If this parameter is not set, all objects are flushed from the group.

quickabortsize

any

If the size of an object that is being downloaded is less than or equal to the quick abort value, and a client aborts during the download, the cache stops downloading the response. If the object is larger than the quick abort size, the cache continues to download the response.

relexpiry

any

Relative expiry time, in seconds, after which to expire an object cached in this content group.

relexpirymillisec

any

Relative expiry time, in milliseconds, after which to expire an object cached in this content group.

removecookies

any

Remove cookies from responses.

Choices:

  • "YES"

  • "NO"

save_config

boolean

If true the module will save the configuration on the NetScaler ADC node if it makes any changes.

The module will not save the configuration on the NetScaler ADC node if it made no changes.

Choices:

  • false ← (default)

  • true

selectorvalue

string

Value of the selector to be used for flushing objects from the content group. Requires that an invalidation selector be configured for the content group.

state

string

The state of the resource being configured by the module on the NetScaler ADC node.

When present, the resource will be added/updated configured according to the module’s parameters.

When absent, the resource will be deleted from the NetScaler ADC node.

When flushed, the resource will be flushed on the NetScaler ADC node.

When unset, the resource will be unset on the NetScaler ADC node.

Choices:

  • "present" ← (default)

  • "absent"

  • "flushed"

  • "unset"

tosecondary

string

content group whose objects are to be sent to secondary.

Choices:

  • "YES"

  • "NO"

type

string

The type of the content group.

Choices:

  • "HTTP"

  • "MYSQL"

  • "MSSQL"

validate_certs

boolean

If false, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.

Choices:

  • false

  • true ← (default)

weaknegrelexpiry

any

Relative expiry time, in seconds, for expiring negative responses. This value is used only if the expiry time cannot be determined from any other source. It is applicable only to the following status codes: 307, 403, 404, and 410.

weakposrelexpiry

any

Relative expiry time, in seconds, for expiring positive responses with response codes between 200 and 399. Cannot be used in combination with other Expiry attributes. Similar to -relExpiry but has lower precedence.

Notes

Note

Examples

---
- name: Sample Playbook
  hosts: localhost
  gather_facts: false
  tasks:
    - name: Sample Task | cachecontentgroup
      delegate_to: localhost
      netscaler.adc.cachecontentgroup:
        state: present
        name: DEFAULT
    - name: Sample Task | cachecontentgroup | 2
      delegate_to: localhost
      netscaler.adc.cachecontentgroup:
        state: present
        name: BASEFILE
        relexpiry: 86000
        weaknegrelexpiry: 600
        maxressize: 256
        memlimit: 2
    - name: Sample Task | cachecontentgroup | 3
      delegate_to: localhost
      netscaler.adc.cachecontentgroup:
        state: present
        name: DELTAJS
        relexpiry: 86000
        weaknegrelexpiry: 600
        insertage: 'NO'
        maxressize: 256
        memlimit: 1
        pinned: 'YES'
    - name: Sample Task | cachecontentgroup | 4
      delegate_to: localhost
      netscaler.adc.cachecontentgroup:
        state: present
        name: NSFEO
        maxressize: 1994752

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

changed

boolean

Indicates if any change is made by the module

Returned: always

Sample: true

diff

dictionary

Dictionary of before and after changes

Returned: always

Sample: {"after": {"key2": "pqr"}, "before": {"key1": "xyz"}, "prepared": "changes done"}

diff_list

list / elements=string

List of differences between the actual configured object and the configuration specified in the module

Returned: when changed

Sample: ["Attribute `key1` differs. Desired: (<class 'str'>) XYZ. Existing: (<class 'str'>) PQR"]

failed

boolean

Indicates if the module failed or not

Returned: always

Sample: false

loglines

list / elements=string

list of logged messages by the module

Returned: always

Sample: ["message 1", "message 2"]

Authors

  • Sumanth Lingappa (@sumanth-lingappa)