W3cubDocs

/Ansible

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
  • enabled
  • disabled
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.
pool
yes
Pool name. This pool must exist.
port
yes
Pool member port
preserve_node
(added in 2.1)
no no
  • True
  • False
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.
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 overriden with this value -- default to 1.
server
yes
The BIG-IP host.
server_port
(added in 2.2)
no 443
The BIG-IP server port.
session_state
(added in 2.0)
no
  • enabled
  • disabled
Set new session availability status for pool member
state
yes present
  • present
  • absent
Pool member state
user
yes
The username to connect to the BIG-IP with. This user must have administrative privileges on the device.
validate_certs
(added in 2.0)
no True
  • True
  • False
If no, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.

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

Note

F5 developed module ‘bigsuds’ required (see http://devcentral.f5.com)

Note

Best run as a local_action in your playbook

Note

Supersedes bigip_pool for managing pool members

This is an Extras Module

For more information on what this means please read Extras Modules

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, developing_test_pr and Developing Modules.

© 2012–2016 Michael DeHaan
© 2016 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/bigip_pool_member_module.html