Add keepalived_instances_overrides for customizing keepalived_instances
Change-Id: Ic6be7519aa869badda0a471fcf6ab11ebc5cbe87
This commit is contained in:
parent
1736491007
commit
5422c2ac9a
@ -53,7 +53,7 @@ keepalived_scripts:
|
||||
# priority: "{{ (groups['haproxy']|length-groups['haproxy'].index(inventory_hostname)*50 }}"
|
||||
# by
|
||||
# priority: "{{ (groups['haproxy'].index(inventory_hostname) == 0) | ternary('100','50') }}"
|
||||
keepalived_instances:
|
||||
_keepalived_default_instances:
|
||||
external:
|
||||
interface: "{{ haproxy_keepalived_external_interface | default(management_bridge) }}"
|
||||
state: "{{ (groups['haproxy'].index(inventory_hostname) == 0) | ternary('MASTER', 'BACKUP') }}"
|
||||
@ -72,3 +72,5 @@ keepalived_instances:
|
||||
vips:
|
||||
- "{{ haproxy_keepalived_internal_vip_cidr | default('169.254.2.1/24') }} dev {{ haproxy_keepalived_internal_interface | default(management_bridge) }}"
|
||||
track_scripts: "{{ keepalived_scripts | dict2items | json_query('[*].{name: key, instance: value.instance}') | rejectattr('instance', 'equalto', 'external') | map(attribute='name') | list }}"
|
||||
|
||||
keepalived_instances: "{{ _keepalived_default_instances | combine(keepalived_instances_overrides | default({}), recursive=True) }}"
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Add ``keepalived_instances_overrides`` variable, which allows passing
|
||||
custom options for ``keepalived_instances``.
|
Loading…
x
Reference in New Issue
Block a user