f5networks.f5_modules.bigip_pool_member module – Manages F5 BIG-IP LTM pool members
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_member
.
New in f5networks.f5_modules 1.0.0
Synopsis
Manages F5 BIG-IP LTM pool members via the REST API.
Parameters
Parameter |
Comments |
---|---|
IP address of the pool member. This can be either IPv4 or IPv6. When creating a new pool member, one of either |
|
List of pool member 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 what changes were made prior to failure. Therefore we strong advise you run the module in |
|
IP address of the pool member. This can be either IPv4 or IPv6. When creating a new pool member, one of either |
|
If you activate more than one health monitor, specifies the number of health monitors that must receive successful responses in order for the link to be considered available. Specifying an empty string will remove the monitors and revert to inheriting from the pool (default). Specifying |
|
Specifies the minimum number of active health monitors that must be successful before the link is considered up. This parameter is only relevant when a This parameter will be ignored if a type of |
|
Monitor rule type when When creating a new pool, if this value is not specified, the default of Choices:
|
|
Pool member connection limit. Setting this to |
|
Pool member description. |
|
FQDN name of the pool member. This can be any name that is a valid RFC 1123 DNS name. Therefore, the only usable characters are “A” to “Z”, “a” to “z”, “0” to “9”, the hyphen (“-”) and the period (“.”). FQDN names must include at least one period; delineating the host from the domain. For example, FQDN names must end with a letter or a number. When creating a new pool member, one of either |
|
Specifies whether the system automatically creates ephemeral nodes using the IP addresses returned by the resolution of a DNS query for a node defined by an FQDN. When When When creating a new pool member, the default for this parameter is Once set this parameter cannot be changed afterwards. This parameter is ignored when Choices:
|
|
Specifies the IP encapsulation using either IPIP (IP encapsulation within IP, RFC 2003) or GRE (Generic Router Encapsulation, RFC 2784) on outbound packets (from BIG-IP system to server-pool member). When When When any other value, the options are None, Inherit from Pool, and Member Specific. |
|
Specifies the health monitors the system currently uses to monitor this resource. |
|
Name of the node to create or re-use when creating a new pool member. While this parameter is optional, we recommend specifying this parameter at all times to mitigate any unexpected behavior. If not specified, a node name is created automatically from either the specified The |
|
Partition to manage resources on. Default: |
|
Pool member port. This value cannot be changed after it has been set. Parameter must be provided when using aggregates. |
|
When state is The node will not be removed if it is still referenced by other pool members. If this happens, the module will not raise an error. Setting this to Choices:
|
|
Specifies a number representing the priority group for the pool member. When adding a new member, the default is To specify a priority, you must activate priority group usage when you create a new pool or when adding or removing pool members. When activated, the system load balances traffic according to the priority group number assigned to the pool member. The higher the number, the higher the priority. So a member with a priority of 3 has higher priority than a member with a priority of 1. |
|
Pool member rate limit (connections-per-second). Setting this to |
|
Pool member ratio weight. Valid values range from 1 through 100. New pool members – unless overridden with this value – default to 1. |
|
Reuses node definitions if requested. Choices:
|
|
Pool member state. Choices:
|
|
If you activate more than one health monitor, specifies the number of health monitors that must receive successful responses in order for the link to be considered available. Specifying an empty string will remove the monitors and revert to inheriting from the pool (default). Specifying |
|
Specifies the minimum number of active health monitors that must be successful before the link is considered up. This parameter is only relevant when a This parameter will be ignored if a type of |
|
Monitor rule type when When creating a new pool, if this value is not specified, the default of Choices:
|
|
Pool member connection limit. Setting this to |
|
Pool member description. |
|
FQDN name of the pool member. This can be any name that is a valid RFC 1123 DNS name. Therefore, the only usable characters are “A” to “Z”, “a” to “z”, “0” to “9”, the hyphen (“-”) and the period (“.”). FQDN names must include at least one period; delineating the host from the domain. For example, FQDN names must end with a letter or a number. When creating a new pool member, one of either |
|
Specifies whether the system automatically creates ephemeral nodes using the IP addresses returned by the resolution of a DNS query for a node defined by an FQDN. When When When creating a new pool member, the default for this parameter is Once set this parameter cannot be changed afterwards. This parameter is ignored when Choices:
|
|
Specifies the IP encapsulation using either IPIP (IP encapsulation within IP, RFC 2003) or GRE (Generic Router Encapsulation, RFC 2784) on outbound packets (from BIG-IP system to server-pool member). When When When any other value, the options are None, Inherit from Pool, and Member Specific. |
|
Specifies the health monitors the system currently uses to monitor this resource. |
|
Name of the node to create or re-use when creating a new pool member. While this parameter is optional, we recommend specifying this parameter at all times to mitigate any unexpected behavior. If not specified, a node name is created automatically from either the specified The |
|
Partition to manage resources on. Default: |
|
Pool name. This pool must exist. |
|
Pool member port. This value cannot be changed after it has been set. Parameter must be provided when using aggregates. |
|
When state is The node will not be removed if it is still referenced by other pool members. If this happens, the module will not raise an error. Setting this to Choices:
|
|
Specifies a number representing the priority group for the pool member. When adding a new member, the default is To specify a priority, you must activate priority group usage when you create a new pool or when adding or removing pool members. When activated, the system load balances traffic according to the priority group number assigned to the pool member. The higher the number, the higher the priority. So a member with a priority of 3 has higher priority than a member with a priority of 1. |
|
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:
|
|
Pool member rate limit (connections-per-second). Setting this to |
|
Pool member ratio weight. Valid values range from 1 through 100. New pool members – unless overridden with this value – default to 1. |
|
Removes members not defined in the This operation is all or none, meaning it will stop if there are some pool members that cannot be removed. Choices:
|
|
Reuses node definitions if requested. Choices:
|
|
Pool member state. 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: Add pool member
bigip_pool_member:
pool: my-pool
partition: Common
name: my-member
host: "{{ ansible_default_ipv4['address'] }}"
port: 80
description: web server
connection_limit: 100
rate_limit: 50
ratio: 2
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Modify pool member ratio and description
bigip_pool_member:
pool: my-pool
partition: Common
name: my-member
host: "{{ ansible_default_ipv4['address'] }}"
port: 80
ratio: 1
description: nginx server
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Remove pool member from pool
bigip_pool_member:
state: absent
pool: my-pool
partition: Common
name: my-member
host: "{{ ansible_default_ipv4['address'] }}"
port: 80
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Force pool member offline
bigip_pool_member:
state: forced_offline
pool: my-pool
partition: Common
name: my-member
host: "{{ ansible_default_ipv4['address'] }}"
port: 80
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Create members with priority groups
bigip_pool_member:
pool: my-pool
partition: Common
host: "{{ item.address }}"
name: "{{ item.name }}"
priority_group: "{{ item.priority_group }}"
port: 80
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
loop:
- address: 1.1.1.1
name: web1
priority_group: 4
- address: 2.2.2.2
name: web2
priority_group: 3
- address: 3.3.3.3
name: web3
priority_group: 2
- address: 4.4.4.4
name: web4
priority_group: 1
- name: Add pool members aggregate
bigip_pool_member:
pool: my-pool
aggregate:
- host: 192.168.1.1
partition: Common
port: 80
description: web server
connection_limit: 100
rate_limit: 50
ratio: 2
- host: 192.168.1.2
partition: Common
port: 80
description: web server
connection_limit: 100
rate_limit: 50
ratio: 2
- host: 192.168.1.3
partition: Common
port: 80
description: web server
connection_limit: 100
rate_limit: 50
ratio: 2
provider:
server: lb.mydomain.com
user: admin
password: secret
delegate_to: localhost
- name: Add pool members aggregate, remove non aggregates
bigip_pool_member:
pool: my-pool
aggregate:
- host: 192.168.1.1
partition: Common
port: 80
description: web server
connection_limit: 100
rate_limit: 50
ratio: 2
- host: 192.168.1.2
partition: Common
port: 80
description: web server
connection_limit: 100
rate_limit: 50
ratio: 2
- host: 192.168.1.3
partition: Common
port: 80
description: web server
connection_limit: 100
rate_limit: 50
ratio: 2
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 |
---|---|
The address of the pool member. Returned: changed Sample: |
|
The new connection limit of the pool member. Returned: changed Sample: |
|
The new description of pool member. Returned: changed Sample: |
|
The FQDN of the pool member. Returned: changed Sample: |
|
Whether FQDN auto population was set on the member or not. Returned: changed Sample: |
|
The new list of monitors for the resource. Returned: changed Sample: |
|
The new priority group. Returned: changed Sample: |
|
The new rate limit, in connections per second, of the pool member. Returned: changed Sample: |
|
The new pool member ratio weight. Returned: changed Sample: |
|
Purges all non-aggregate pool members from device. Returned: changed Sample: |