Author: | Matt Hite |
---|
parameter | required | default | choices | comments |
---|---|---|---|---|
host | no | Pool member IP | ||
lb_method | no | round_robin |
|
Load balancing method (added in Ansible 1.3) |
monitor_type | no |
|
Monitor rule type when monitors > 1 (added in Ansible 1.3) | |
monitors | no | Monitor template name list. Always use the full path to the monitor. (added in Ansible 1.3) | ||
name | yes | Pool name | ||
partition | no | Common | Partition of pool/pool member | |
password | yes | BIG-IP password | ||
port | no | Pool member port | ||
quorum | no | Monitor quorum value when monitor_type is m_of_n (added in Ansible 1.3) | ||
server | yes | BIG-IP host | ||
service_down_action | no |
|
Sets the action to take when node goes down in pool (added in Ansible 1.3) | |
slow_ramp_time | no | Sets the ramp-up time (in seconds) to gradually ramp up the load on newly added or freshly detected up pool members (added in Ansible 1.3) | ||
state | no | present |
|
Pool/pool member state |
user | yes | BIG-IP username |
Note
Requires bigsuds
## playbook task examples:
---
# file bigip-test.yml
# ...
- hosts: localhost
tasks:
- name: Create pool
local_action: >
bigip_pool
server=lb.mydomain.com
user=admin
password=mysecret
state=present
name=matthite-pool
partition=matthite
lb_method=least_connection_member
slow_ramp_time=120
- name: Modify load balancer method
local_action: >
bigip_pool
server=lb.mydomain.com
user=admin
password=mysecret
state=present
name=matthite-pool
partition=matthite
lb_method=round_robin
- hosts: bigip-test
tasks:
- name: Add pool member
local_action: >
bigip_pool
server=lb.mydomain.com
user=admin
password=mysecret
state=present
name=matthite-pool
partition=matthite
host="{{ ansible_default_ipv4["address"] }}"
port=80
- name: Remove pool member from pool
local_action: >
bigip_pool
server=lb.mydomain.com
user=admin
password=mysecret
state=absent
name=matthite-pool
partition=matthite
host="{{ ansible_default_ipv4["address"] }}"
port=80
- hosts: localhost
tasks:
- name: Delete pool
local_action: >
bigip_pool
server=lb.mydomain.com
user=admin
password=mysecret
state=absent
name=matthite-pool
partition=matthite
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