f5networks.f5_modules.bigip_snat_translation – Manage SNAT translations on a BIG-IP
Note
This plugin is part of the f5networks.f5_modules collection (version 1.13.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 f5networks.f5_modules
.
To use it in a playbook, specify: f5networks.f5_modules.bigip_snat_translation
.
New in version 1.0.0: of f5networks.f5_modules
Parameters
Parameter |
Comments |
---|---|
Specifies the IP address of the SNAT translation. When This parameter cannot be updated after it is set. |
|
If Choices:
|
|
Specifies a limit on the number of connections a translation address must reach before it no longer initiates a connection. The default value of The accepted value range is |
|
Description of snat-translation. |
|
Specifies the amount of time connections to an IP address initiated using a SNAT address are allowed to remain idle before being automatically disconnected. The accepted value range is |
|
The name of SNAT translation. |
|
Device partition to manage resources on. Required with state |
|
A dict object containing connection details. |
|
Configures the auth provider for to obtain authentication tokens from the remote device. This option is really used when working with BIG-IQ devices. |
|
If You may omit this option by setting the environment variable Previously used variable Choices:
|
|
The password for the user account used to connect to the BIG-IP. You may omit this option by setting the environment variable |
|
The BIG-IP host. You may omit this option by setting the environment variable |
|
The BIG-IP server port. You may omit this option by setting the environment variable Default: 443 |
|
Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. |
|
Configures the transport connection to use when connecting to the remote device. Choices:
|
|
The username to connect to the BIG-IP with. This user must have administrative privileges on the device. You may omit this option by setting the environment variable |
|
If You may omit this option by setting the environment variable Choices:
|
|
The SNAT translation state. If Choices:
|
|
Specifies the amount of time that TCP connections initiated using a SNAT address are allowed to remain idle before being automatically disconnected. The accepted value range is |
|
The traffic group for the snat-translation address. When creating a new address, if this value is not specified, the default is |
|
Specifies the amount of time UDP connections initiated using a SNAT address are allowed to remain idle before being automatically disconnected. The accepted value range is |
Notes
Note
For more information on using Ansible to manage F5 Networks devices see https://www.ansible.com/integrations/networks/f5.
Requires BIG-IP software version >= 12.
The F5 modules only manipulate the running configuration of the F5 product. To ensure that BIG-IP specific configuration persists to disk, be sure to include at least one task that uses the f5networks.f5_modules.bigip_config module to save the running configuration. Refer to the module’s documentation for the correct usage of the module to save your running configuration.
Examples
- name: Create a SNAT translation 'my-snat-translation'
bigip_snat_translation:
name: my-snat-pool
state: present
address: 10.10.10.10
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Modify a SNAT translation 'my-snat-translation'
bigip_snat_translation:
name: my-snat-pool
state: present
address: 10.10.10.10
arp: no
connection_limit: 300
ip_idle_timeout: 1800
tcp_idle_timeout: 1800
udp_idle_timeout: 1800
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Disable a SNAT translation 'my-snat-translation'
bigip_snat_translation:
name: my-snat-pool
state: disabled
address: 10.10.10.10
arp: no
connection_limit: 300
ip_idle_timeout: 1800
tcp_idle_timeout: 1800
udp_idle_timeout: 1800
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Enable a SNAT translation 'my-snat-translation'
bigip_snat_translation:
name: my-snat-pool
state: enabled
address: 10.10.10.10
arp: no
connection_limit: 300
ip_idle_timeout: 1800
tcp_idle_timeout: 1800
udp_idle_timeout: 1800
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Create using partition other then /Common on a SNAT translation 'my-new-snat-translation'
bigip_snat_translation:
name: my-new-snat-pool
state: enabled
address: 10.10.10.10
arp: no
connection_limit: 300
ip_idle_timeout: 1800
partition: ansible
tcp_idle_timeout: 1800
udp_idle_timeout: 1800
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Modify using traffic group other then /Common/traffic-group-1 on a SNAT translation 'my-new-snat-translation'
bigip_snat_translation:
name: my-new-snat-pool
state: enabled
address: 10.10.10.10
arp: no
connection_limit: 300
ip_idle_timeout: 1800
partition: ansible
tcp_idle_timeout: 1800
traffic_group: /Common/ansible
udp_idle_timeout: 1800
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
IP address used for SNAT translation. Returned: changed and success Sample: “10.10.10.10” |
|
Whether snat-translation sends arp requests. Returned: changed Sample: true |
|
The new connection limit of the virtual address. Returned: changed Sample: 1000 |
|
Description of the snat-translation. Returned: changed Sample: “My snat-translation” |
|
IP idle timeout value for the snat-translation. Returned: changed Sample: 300 |
|
The new state of the snat-translation. Returned: changed Sample: “disabled” |
|
TCP idle timeout value for the snat-translation. Returned: changed Sample: 1800 |
|
Assigned traffic group. Returned: changed Sample: “/Common/traffic-group-1” |
|
UDP idle timeout value for the snat-translation. Returned: changed Sample: “indefinite” |
Authors
Greg Crosby (@crosbygw)
Wojciech Wypior (@wojtek0806)