f5networks.f5_modules.bigip_pool module – Manages F5 BIG-IP LTM pools
Note
This module is part of the f5networks.f5_modules collection (version 1.32.1).
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_pool
.
New in f5networks.f5_modules 1.0.0
Synopsis
Manages F5 BIG-IP LTM pools via iControl REST API.
Parameters
Parameter |
Comments |
---|---|
List of pool definitions to be created, modified, or removed. When using The module will NOT rollback any changes it has made prior to encountering the error. The module also will not indicate which changes were made prior to failure. Therefore we strongly advise you run the module in |
|
Specifies descriptive text that identifies the pool. |
|
Load balancing method. When creating a new pool, if this value is not specified, the default of Choices:
|
|
Arbitrary key/value pairs you can attach to a pool. This is useful in situations where you might want to annotate a pool to be managed by Ansible. Key names are stored as strings; this includes names that are numbers. Values for all of the keys are stored as strings; this includes values that are numbers. Data will be persisted, not ephemeral. |
|
Specifies the minimum number of pool members that must be up, otherwise, the system takes the action specified in the Use this option for gateway pools in a redundant system where a unit number is applied to the pool. This indicates the pool is configured only on the specified unit. When creating a new pool, if this parameter is not specified, the default is |
|
Specifies the action to take if When creating a new pool, if this parameter is not specified, the default is Choices:
|
|
Enables or disables the If you enable this feature, you must also specify a value for both the When creating a new pool, if this parameter is not specified, the default is Choices:
|
|
Monitor rule type when When creating a new pool, if this value is not specified, the default of When When When Both Choices:
|
|
Monitor template name list. If the partition is not provided as part of the monitor name, the |
|
Pool name |
|
Device partition on which to manage resources. Default: |
|
Specifies whether the system load balances traffic according to the priority number assigned to the pool member. When creating a new pool, if this parameter is not specified, the default of To disable this setting, provide the value Once you enable this setting, you can specify pool member priority when you create a new pool or on a pool member’s properties screen. The system treats same-priority pool members as a group. To enable priority group activation, provide a number from When a sufficient number of members become available in the higher priority group, the system again directs traffic to the higher priority group. |
|
Monitor quorum value when Quorum must be a value of 1 or greater when |
|
Sets the number of times the system tries to contact a pool member after a passive failure. |
|
Sets the action to take when node goes down in pool. Choices:
|
|
Sets the ramp-up time (in seconds) to gradually ramp up the load on newly added or freshly detected up pool members. |
|
When When Choices:
|
|
Specifies descriptive text that identifies the pool. |
|
Load balancing method. When creating a new pool, if this value is not specified, the default of Choices:
|
|
Arbitrary key/value pairs you can attach to a pool. This is useful in situations where you might want to annotate a pool to be managed by Ansible. Key names are stored as strings; this includes names that are numbers. Values for all of the keys are stored as strings; this includes values that are numbers. Data will be persisted, not ephemeral. |
|
Specifies the minimum number of pool members that must be up, otherwise, the system takes the action specified in the Use this option for gateway pools in a redundant system where a unit number is applied to the pool. This indicates the pool is configured only on the specified unit. When creating a new pool, if this parameter is not specified, the default is |
|
Specifies the action to take if When creating a new pool, if this parameter is not specified, the default is Choices:
|
|
Enables or disables the If you enable this feature, you must also specify a value for both the When creating a new pool, if this parameter is not specified, the default is Choices:
|
|
Monitor rule type when When creating a new pool, if this value is not specified, the default of When When When Both Choices:
|
|
Monitor template name list. If the partition is not provided as part of the monitor name, the |
|
Pool name |
|
Device partition on which to manage resources. Default: |
|
Specifies whether the system load balances traffic according to the priority number assigned to the pool member. When creating a new pool, if this parameter is not specified, the default of To disable this setting, provide the value Once you enable this setting, you can specify pool member priority when you create a new pool or on a pool member’s properties screen. The system treats same-priority pool members as a group. To enable priority group activation, provide a number from When a sufficient number of members become available in the higher priority group, the system again directs traffic to the higher priority group. |
|
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 or the BIG-IQ. You may omit this option by setting the environment variable |
|
The BIG-IP host or the BIG-IQ 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: |
|
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 or the BIG-IQ. 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:
|
|
Monitor quorum value when Quorum must be a value of 1 or greater when |
|
Removes pools not defined in the This operation is all or none, meaning it will stop if there are some pools that cannot be removed. Choices:
|
|
Sets the number of times the system tries to contact a pool member after a passive failure. |
|
Sets the action to take when node goes down in pool. Choices:
|
|
Sets the ramp-up time (in seconds) to gradually ramp up the load on newly added or freshly detected up pool members. |
|
When When Choices:
|
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 pool
bigip_pool:
state: present
name: my-pool
partition: Common
lb_method: least-connections-member
slow_ramp_time: 120
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Modify load balancer method
bigip_pool:
state: present
name: my-pool
partition: Common
lb_method: round-robin
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Set a single monitor (with enforcement)
bigip_pool:
state: present
name: my-pool
partition: Common
monitor_type: single
monitors:
- http
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Set a single monitor (without enforcement)
bigip_pool:
state: present
name: my-pool
partition: Common
monitors:
- http
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Set multiple monitors (all must succeed)
bigip_pool:
state: present
name: my-pool
partition: Common
monitor_type: and_list
monitors:
- http
- tcp
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Set multiple monitors (at least 1 must succeed)
bigip_pool:
state: present
name: my-pool
partition: Common
monitor_type: m_of_n
quorum: 1
monitors:
- http
- tcp
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Set multiple monitors (at least 2 must succeed)
bigip_pool:
state: present
name: my-pool
partition: Common
availability_requirements_type: m_of_n
availability_requirements_at_least: 2
monitors:
- http
- tcp
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Delete pool
bigip_pool:
state: absent
name: my-pool
partition: Common
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Add metadata to pool
bigip_pool:
state: present
name: my-pool
partition: Common
metadata:
ansible: 2.4
updated_at: 2017-12-20T17:50:46Z
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Add pools Aggregate
bigip_pool:
aggregate:
- name: my-pool
partition: Common
lb_method: least-connections-member
slow_ramp_time: 120
- name: my-pool2
partition: Common
lb_method: least-sessions
slow_ramp_time: 120
- name: my-pool3
partition: Common
lb_method: round-robin
slow_ramp_time: 120
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Add pools Aggregate, purge others
bigip_pool:
aggregate:
- name: my-pool
partition: Common
lb_method: least-connections-member
slow_ramp_time: 120
- name: my-pool2
partition: Common
lb_method: least-sessions
slow_ramp_time: 120
- name: my-pool3
partition: Common
lb_method: round-robin
slow_ramp_time: 120
replace_all_with: true
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 |
---|---|
Description set on the pool. Returned: changed Sample: |
|
The load balancing method set for the pool. Returned: changed Sample: |
|
The new value of the pool. Returned: changed Sample: |
|
Changed value for the monitor_type of the pool. Returned: changed Sample: |
|
Monitors set on the pool. Returned: changed Sample: |
|
The new minimum number of members to activate the priority group. Returned: changed Sample: |
|
The quorum that was set on the pool. Returned: changed Sample: |
|
Purges all non-aggregate pools from device Returned: changed Sample: |
|
The new value set for the number of tries to contact member. Returned: changed Sample: |
|
Service down action that is set on the pool. Returned: changed Sample: |
|
The new value set for the slow ramp-up time. Returned: changed Sample: |