On this page
bigip_pool_member - Manages F5 BIG-IP LTM pool members
New in version 1.4.
Synopsis
- Manages F5 BIG-IP LTM pool members via iControl SOAP API
Requirements (on host that executes module)
- bigsuds
Options
parameter | required | default | choices | comments |
---|---|---|---|---|
connection_limit |
no |
Pool member connection limit. Setting this to 0 disables the limit.
|
||
description |
no |
Pool member description
|
||
host |
yes |
Pool member IP
aliases: address, name
|
||
monitor_state
(added in 2.0)
|
no |
|
Set monitor availability status for pool member
|
|
partition |
no | Common |
Partition
|
|
password |
yes |
The password for the user account used to connect to the BIG-IP. This option can be omitted if the environment variable F5_PASSWORD is set.
|
||
pool |
yes |
Pool name. This pool must exist.
|
||
port |
yes |
Pool member port
|
||
preserve_node
(added in 2.1)
|
no | no |
|
When state is absent and the pool member is no longer referenced in other pools, the default behavior removes the unused node o bject. Setting this to 'yes' disables this behavior.
|
priority_group
(added in 2.4)
|
no |
Sets priority group for a pool member.
|
||
rate_limit |
no |
Pool member rate limit (connections-per-second). Setting this to 0 disables the limit.
|
||
ratio |
no |
Pool member ratio weight. Valid values range from 1 through 100. New pool members -- unless overridden with this value -- default to 1.
|
||
server |
yes |
The BIG-IP host. This option can be omitted if the environment variable F5_SERVER is set.
|
||
server_port
(added in 2.2)
|
no | 443 |
The BIG-IP server port. This option can be omitted if the environment variable F5_SERVER_PORT is set.
|
|
session_state
(added in 2.0)
|
no |
|
Set new session availability status for pool member
|
|
state |
yes | present |
|
Pool member state
|
user |
yes |
The username to connect to the BIG-IP with. This user must have administrative privileges on the device. This option can be omitted if the environment variable F5_USER is set.
|
||
validate_certs
(added in 2.0)
|
no | True |
|
If no , SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. This option can be omitted if the environment variable F5_VALIDATE_CERTS is set.
|
Examples
- name: Add pool member
bigip_pool_member:
server: "lb.mydomain.com"
user: "admin"
password: "secret"
state: "present"
pool: "my-pool"
partition: "Common"
host: "{{ ansible_default_ipv4['address'] }}"
port: 80
description: "web server"
connection_limit: 100
rate_limit: 50
ratio: 2
delegate_to: localhost
- name: Modify pool member ratio and description
bigip_pool_member:
server: "lb.mydomain.com"
user: "admin"
password: "secret"
state: "present"
pool: "my-pool"
partition: "Common"
host: "{{ ansible_default_ipv4['address'] }}"
port: 80
ratio: 1
description: "nginx server"
delegate_to: localhost
- name: Remove pool member from pool
bigip_pool_member:
server: "lb.mydomain.com"
user: "admin"
password: "secret"
state: "absent"
pool: "my-pool"
partition: "Common"
host: "{{ ansible_default_ipv4['address'] }}"
port: 80
delegate_to: localhost
# The BIG-IP GUI doesn't map directly to the API calls for "Pool ->
# Members -> State". The following states map to API monitor
# and session states.
#
# Enabled (all traffic allowed):
# monitor_state=enabled, session_state=enabled
# Disabled (only persistent or active connections allowed):
# monitor_state=enabled, session_state=disabled
# Forced offline (only active connections allowed):
# monitor_state=disabled, session_state=disabled
#
# See https://devcentral.f5.com/questions/icontrol-equivalent-call-for-b-node-down
- name: Force pool member offline
bigip_pool_member:
server: "lb.mydomain.com"
user: "admin"
password: "secret"
state: "present"
session_state: "disabled"
monitor_state: "disabled"
pool: "my-pool"
partition: "Common"
host: "{{ ansible_default_ipv4['address'] }}"
port: 80
delegate_to: localhost
Notes
Note
- Requires BIG-IP software version >= 11
- F5 developed module ‘bigsuds’ required (see http://devcentral.f5.com)
- Best run as a local_action in your playbook
- Supersedes bigip_pool for managing pool members
Status
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/bigip_pool_member_module.html