mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
(cherry picked from commit 7533f9ac26)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -49,7 +49,7 @@ options:
|
||||
- This can be used to terminate long-running sessions after a server is put
|
||||
into maintenance mode. Overridden by the drain option.
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
socket:
|
||||
description:
|
||||
- Path to the HAProxy socket file.
|
||||
@@ -68,25 +68,25 @@ options:
|
||||
description:
|
||||
- Disable/enable agent checks (depending on I(state) value).
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
version_added: 1.0.0
|
||||
health:
|
||||
description:
|
||||
- Disable/enable health checks (depending on I(state) value).
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
version_added: "1.0.0"
|
||||
fail_on_not_found:
|
||||
description:
|
||||
- Fail whenever trying to enable/disable a backend host that does not exist
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
wait:
|
||||
description:
|
||||
- Wait until the server reports a status of 'UP' when C(state=enabled),
|
||||
status of 'MAINT' when C(state=disabled) or status of 'DRAIN' when C(state=drain)
|
||||
type: bool
|
||||
default: no
|
||||
default: false
|
||||
wait_interval:
|
||||
description:
|
||||
- Number of seconds to wait between retries.
|
||||
@@ -118,8 +118,8 @@ EXAMPLES = r'''
|
||||
community.general.haproxy:
|
||||
state: disabled
|
||||
host: '{{ inventory_hostname }}'
|
||||
health: yes
|
||||
agent: yes
|
||||
health: true
|
||||
agent: true
|
||||
|
||||
- name: Disable server without backend pool name (apply to all available backend pool)
|
||||
community.general.haproxy:
|
||||
@@ -139,7 +139,7 @@ EXAMPLES = r'''
|
||||
host: '{{ inventory_hostname }}'
|
||||
socket: /var/run/haproxy.sock
|
||||
backend: www
|
||||
wait: yes
|
||||
wait: true
|
||||
|
||||
# Place server in drain mode, providing a socket file. Then check the server's
|
||||
# status every minute to see if it changes to maintenance mode, continuing if it
|
||||
@@ -149,8 +149,8 @@ EXAMPLES = r'''
|
||||
host: '{{ inventory_hostname }}'
|
||||
socket: /var/run/haproxy.sock
|
||||
backend: www
|
||||
wait: yes
|
||||
drain: yes
|
||||
wait: true
|
||||
drain: true
|
||||
wait_interval: 60
|
||||
wait_retries: 60
|
||||
|
||||
@@ -160,13 +160,13 @@ EXAMPLES = r'''
|
||||
host: '{{ inventory_hostname }}'
|
||||
backend: www
|
||||
socket: /var/run/haproxy.sock
|
||||
shutdown_sessions: yes
|
||||
shutdown_sessions: true
|
||||
|
||||
- name: Disable server without backend pool name (apply to all available backend pool) but fail when the backend host is not found
|
||||
community.general.haproxy:
|
||||
state: disabled
|
||||
host: '{{ inventory_hostname }}'
|
||||
fail_on_not_found: yes
|
||||
fail_on_not_found: true
|
||||
|
||||
- name: Enable server in 'www' backend pool
|
||||
community.general.haproxy:
|
||||
@@ -179,14 +179,14 @@ EXAMPLES = r'''
|
||||
state: enabled
|
||||
host: '{{ inventory_hostname }}'
|
||||
backend: www
|
||||
wait: yes
|
||||
wait: true
|
||||
|
||||
- name: Enable server in 'www' backend pool wait until healthy. Retry 10 times with intervals of 5 seconds to retrieve the health
|
||||
community.general.haproxy:
|
||||
state: enabled
|
||||
host: '{{ inventory_hostname }}'
|
||||
backend: www
|
||||
wait: yes
|
||||
wait: true
|
||||
wait_retries: 10
|
||||
wait_interval: 5
|
||||
|
||||
|
||||
Reference in New Issue
Block a user