netscaler.adc.nspbr module – Configuration for Policy Based Routing(PBR) entry resource.
Note
This module is part of the netscaler.adc collection (version 2.6.2).
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.nspbr
.
New in netscaler.adc 2.0.0
Synopsis
Configuration for Policy Based Routing(PBR) entry resource.
Parameters
Parameter |
Comments |
---|---|
Action to perform on the outgoing IPv4 packets that match the PBR. Available settings function as follows: * * Choices:
|
|
Base NITRO API path. Define only in case of an ADM service proxy call Default: |
|
IP address or range of IP addresses to match against the destination IP address of an outgoing IPv4 packet. In the command line interface, separate the range with a hyphen. For example: 10.102.29.30-10.102.29.189. Choices:
|
|
Either the equals (=) or does not equal (!=) logical operator. Choices:
|
|
IP address or range of IP addresses to match against the destination IP address of an outgoing IPv4 packet. In the command line interface, separate the range with a hyphen. For example: 10.102.29.30-10.102.29.189. |
|
Port number or range of port numbers to match against the destination port number of an outgoing IPv4 packet. In the command line interface, separate the range with a hyphen. For example: 40-90. Note: The destination port can be specified only for TCP and UDP protocols. Choices:
|
|
Either the equals (=) or does not equal (!=) logical operator. Choices:
|
|
Port number or range of port numbers to match against the destination port number of an outgoing IPv4 packet. In the command line interface, separate the range with a hyphen. For example: 40-90. Note: The destination port can be specified only for TCP and UDP protocols. |
|
To get a detailed view. Choices:
|
|
ID of an interface. The Citrix ADC compares the PBR only to the outgoing packets on the specified interface. If you do not specify any value, the appliance compares the PBR to the outgoing packets on all interfaces. |
|
The Tunnel name. Choices:
|
|
The iptunnel name where packets need to be forwarded upon. |
|
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 |
|
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 |
|
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 |
|
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. |
|
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. |
|
The name of the monitor.(Can be only of type ping or ARP ) |
|
Monitor the route specified byte Next Hop parameter. This parameter is not applicable if you specify a link load balancing (LLB) virtual server name with the Next Hop parameter. Choices:
|
|
Name for the PBR. 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 PBR is created. |
|
The IP address of the NetScaler ADC appliance acting as a proxy server. Define only in case of an ADM service proxy call Choices:
|
|
IP address of the next hop router or the name of the link load balancing virtual server to which to send matching packets if action is set to ALLOW. If you specify a link load balancing (LLB) virtual server, which can provide a backup if a next hop link fails, first make sure that the next hops bound to the LLB virtual server are actually next hops that are directly connected to the Citrix ADC. Otherwise, the Citrix ADC throws an error when you attempt to create the PBR. The next hop can be null to represent null routes Choices:
|
|
The Next Hop IP address or gateway name. |
|
The authentication token provided by a login operation. |
|
The password with which to authenticate to the NetScaler ADC node. |
|
Which protocol to use when accessing the nitro API objects. Choices:
|
|
The username with which to authenticate to the NetScaler ADC node. |
|
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. |
|
The owner node group in a Cluster for this pbr rule. If ownernode is not specified then the pbr rule is treated as Striped pbr rule. |
|
Priority of the PBR, which determines the order in which it is evaluated relative to the other PBRs. If you do not specify priorities while creating PBRs, the PBRs are evaluated in the order in which they are created. |
|
Protocol, identified by protocol name, to match against the protocol of an outgoing IPv4 packet. Choices:
|
|
Protocol, identified by protocol number, to match against the protocol of an outgoing IPv4 packet. |
|
If The module will not save the configuration on the NetScaler ADC node if it made no changes. Choices:
|
|
IP address or range of IP addresses to match against the source IP address of an outgoing IPv4 packet. In the command line interface, separate the range with a hyphen. For example: 10.102.29.30-10.102.29.189. Choices:
|
|
Either the equals (=) or does not equal (!=) logical operator. Choices:
|
|
IP address or range of IP addresses to match against the source IP address of an outgoing IPv4 packet. In the command line interface, separate the range with a hyphen. For example: 10.102.29.30-10.102.29.189. |
|
MAC address to match against the source MAC address of an outgoing IPv4 packet. |
|
Used to define range of Source MAC address. It takes string of 0 and 1, 0s are for exact match and 1s for wildcard. For matching first 3 bytes of MAC address, srcMacMask value “000000111111”. |
|
Port number or range of port numbers to match against the source port number of an outgoing IPv4 packet. In the command line interface, separate the range with a hyphen. For example: 40-90. Note: The destination port can be specified only for TCP and UDP protocols. Choices:
|
|
Either the equals (=) or does not equal (!=) logical operator. Choices:
|
|
Port number or range of port numbers to match against the source port number of an outgoing IPv4 packet. In the command line interface, separate the range with a hyphen. For example: 40-90. Note: The destination port can be specified only for TCP and UDP protocols. |
|
The state of the resource being configured by the module on the NetScaler ADC node. When When When When When Choices:
|
|
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. |
|
If Choices:
|
|
ID of the VLAN. The Citrix ADC compares the PBR only to the outgoing packets on the specified VLAN. If you do not specify any interface ID, the appliance compares the PBR to the outgoing packets on all VLANs. |
|
ID of the VXLAN. The Citrix ADC compares the PBR only to the outgoing packets on the specified VXLAN. If you do not specify any interface ID, the appliance compares the PBR to the outgoing packets on all VXLANs. |
|
The vlan to vxlan mapping to be applied for incoming packets over this pbr tunnel |
Notes
Note
For more information on using Ansible to manage NetScaler ADC Network devices see https://www.ansible.com/integrations/networks/citrixadc.
Examples
---
- name: Sample nspbr playbook
hosts: demo_netscalers
gather_facts: false
tasks:
- name: Configure nspbr
delegate_to: localhost
netscaler.adc.nspbr:
state: present
name: mgmt_pbr
action: ALLOW
srcip: true
srcipop: '='
srcipval: 10.189.64.50
destip: true
destipop: '!='
destipval: 10.189.64.1-10.189.64.254
nexthop: true
nexthopval: 10.189.64.1
priority: '10'
kernelstate: SFAPPLIED61
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Indicates if any change is made by the module Returned: always Sample: |
|
Dictionary of before and after changes Returned: always Sample: |
|
List of differences between the actual configured object and the configuration specified in the module Returned: when changed Sample: |
|
Indicates if the module failed or not Returned: always Sample: |
|
list of logged messages by the module Returned: always Sample: |