f5networks.f5_modules.bigip_pool_member – Manages F5 BIG-IP LTM pool members
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_pool_member
.
New in version 1.0.0: of f5networks.f5_modules
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 |
|
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 characters that can be used 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. This parameter is optional. If not specified, a node name will be created automatically from either the specified The |
|
Partition to manage resources on. Default: “Common” |
|
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. 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:
|
|
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
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
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
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
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: yes
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: “1.2.3.4” |
|
The new connection limit of the pool member. Returned: changed Sample: 1000 |
|
The new description of pool member. Returned: changed Sample: “My pool member” |
|
The FQDN of the pool member. Returned: changed Sample: “foo.bar.com” |
|
Whether FQDN auto population was set on the member or not. Returned: changed Sample: true |
|
The new list of monitors for the resource. Returned: changed Sample: [“/Common/monitor1”, “/Common/monitor2”] |
|
The new priority group. Returned: changed Sample: 3 |
|
The new rate limit, in connections per second, of the pool member. Returned: changed Sample: 100 |
|
The new pool member ratio weight. Returned: changed Sample: 50 |
|
Purges all non-aggregate pool members from device. Returned: changed Sample: true |
Authors
Tim Rupp (@caphrim007)
Wojciech Wypior (@wojtek0806)