mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Documentation fixes and enhancements
This commit is contained in:
parent
c556e673c7
commit
b26a88095f
1 changed files with 73 additions and 23 deletions
|
@ -56,7 +56,7 @@ options:
|
||||||
aliases: []
|
aliases: []
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Pool state
|
- Pool/pool member state
|
||||||
required: false
|
required: false
|
||||||
default: present
|
default: present
|
||||||
choices: ['present', 'absent']
|
choices: ['present', 'absent']
|
||||||
|
@ -70,7 +70,7 @@ options:
|
||||||
aliases: ['pool']
|
aliases: ['pool']
|
||||||
partition:
|
partition:
|
||||||
description:
|
description:
|
||||||
- Partition
|
- Partition of pool/pool member
|
||||||
required: false
|
required: false
|
||||||
default: 'Common'
|
default: 'Common'
|
||||||
choices: []
|
choices: []
|
||||||
|
@ -78,6 +78,7 @@ options:
|
||||||
lb_method:
|
lb_method:
|
||||||
description:
|
description:
|
||||||
- Load balancing method
|
- Load balancing method
|
||||||
|
version_added: "1.3"
|
||||||
required: False
|
required: False
|
||||||
default: 'round_robin'
|
default: 'round_robin'
|
||||||
choices: ['round_robin', 'ratio_member', 'least_connection_member',
|
choices: ['round_robin', 'ratio_member', 'least_connection_member',
|
||||||
|
@ -94,6 +95,7 @@ options:
|
||||||
monitor_type:
|
monitor_type:
|
||||||
description:
|
description:
|
||||||
- Monitor rule type when monitors > 1
|
- Monitor rule type when monitors > 1
|
||||||
|
version_added: "1.3"
|
||||||
required: False
|
required: False
|
||||||
default: null
|
default: null
|
||||||
choices: ['and_list', 'm_of_n']
|
choices: ['and_list', 'm_of_n']
|
||||||
|
@ -101,20 +103,23 @@ options:
|
||||||
quorum:
|
quorum:
|
||||||
description:
|
description:
|
||||||
- Monitor quorum value when monitor_type is m_of_n
|
- Monitor quorum value when monitor_type is m_of_n
|
||||||
|
version_added: "1.3"
|
||||||
required: False
|
required: False
|
||||||
default: null
|
default: null
|
||||||
choices: []
|
choices: []
|
||||||
aliases: []
|
aliases: []
|
||||||
monitors:
|
monitors:
|
||||||
description:
|
description:
|
||||||
- Monitor template name list
|
- Monitor template name list. Always use the full path to the monitor.
|
||||||
|
version_added: "1.3"
|
||||||
required: False
|
required: False
|
||||||
default: null
|
default: null
|
||||||
choices: []
|
choices: []
|
||||||
aliases: []
|
aliases: []
|
||||||
slow_ramp_time:
|
slow_ramp_time:
|
||||||
description:
|
description:
|
||||||
- Sets the ramp-up time (in seconds) to gradually ramp up the load on newly added or freshly detected UP pool members
|
- Sets the ramp-up time (in seconds) to gradually ramp up the load on newly added or freshly detected up pool members
|
||||||
|
version_added: "1.3"
|
||||||
required: False
|
required: False
|
||||||
default: null
|
default: null
|
||||||
choices: []
|
choices: []
|
||||||
|
@ -122,6 +127,7 @@ options:
|
||||||
service_down_action:
|
service_down_action:
|
||||||
description:
|
description:
|
||||||
- Sets the action to take when node goes down in pool
|
- Sets the action to take when node goes down in pool
|
||||||
|
version_added: "1.3"
|
||||||
required: False
|
required: False
|
||||||
default: null
|
default: null
|
||||||
choices: ['none', 'reset', 'drop', 'reselect']
|
choices: ['none', 'reset', 'drop', 'reselect']
|
||||||
|
@ -144,30 +150,74 @@ options:
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
|
|
||||||
### Examples assume [localhost] is defined in inventory file
|
## playbook task examples:
|
||||||
|
|
||||||
## ad-hoc ansible CLI example
|
|
||||||
|
|
||||||
# Create (or update) pool /matthite/matthite-pool on load balancer lb.mydomain.com
|
|
||||||
ansible -c local localhost -m bigip_pool -a "server=lb.mydomain.com user=admin password=mysecret state=present name=matthite-pool partition=matthite lb_method=least_connection_member slow_ramp_time=120"
|
|
||||||
|
|
||||||
# Remove pool /matthite/matthite-pool on load balancer lb.mydomain.com
|
|
||||||
ansible -c local localhost -m bigip_pool -a "server=lb.mydomain.com user=admin password=mysecret state=absent name=matthite-pool partition=matthite"
|
|
||||||
|
|
||||||
# Add pool member /matthite/1.1.1.1:80 to pool /matthite/matthite-pool on load balancer lb.mydomain.com
|
|
||||||
ansible -c local localhost -m bigip_pool -a "server=lb.mydomain.com user=admin password=mysecret state=present name=matthite-pool partition=matthite host=1.1.1.1 port=80"
|
|
||||||
|
|
||||||
# Remove pool member /matthite/1.1.1.1:80 to pool /matthite/matthite-pool on load balancer lb.mydomain.com
|
|
||||||
ansible -c local localhost -m bigip_pool -a "server=lb.mydomain.com user=admin password=mysecret state=absent name=matthite-pool partition=matthite host=1.1.1.1 port=80"
|
|
||||||
|
|
||||||
## playbook task example:
|
|
||||||
|
|
||||||
---
|
---
|
||||||
# file bigip-test.yml
|
# file bigip-test.yml
|
||||||
# ...
|
# ...
|
||||||
|
- hosts: localhost
|
||||||
tasks:
|
tasks:
|
||||||
- name: Create /matthite/matthite-pool
|
- 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
|
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
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue