maxscale: refs #8822 - refactor some minnor things
This commit is contained in:
parent
e1c7759e7a
commit
cf83aa4592
|
@ -16,23 +16,22 @@ vrrp_script check_maxscale {
|
||||||
vrrp_instance {{ vip.name }} {
|
vrrp_instance {{ vip.name }} {
|
||||||
interface {{ k.interface }}
|
interface {{ k.interface }}
|
||||||
state BACKUP
|
state BACKUP
|
||||||
priority {{ k.priorities.master if vip.host == inventory_hostname_short else k.priorities.backup }}
|
priority {{ k.priorities.master if vip.host == inventory_hostname else k.priorities.backup }}
|
||||||
virtual_router_id {{ vip.vrid }}
|
virtual_router_id {{ vip.vrid }}
|
||||||
advert_int 1
|
advert_int 1
|
||||||
accept
|
accept
|
||||||
unicast_src_ip {{ ansible_host }}
|
unicast_src_ip {{ ansible_default_ipv4.address }}
|
||||||
|
|
||||||
unicast_peer {
|
unicast_peer {
|
||||||
{% for peer in k.peers if peer.host != inventory_hostname %}
|
{% for peer in k.peers %}
|
||||||
|
{% if peer.host != inventory_hostname %}
|
||||||
{{ peer.ip }}
|
{{ peer.ip }}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
virtual_ipaddress {
|
virtual_ipaddress {
|
||||||
{{ vip.vip }}
|
{{ vip.vip }}
|
||||||
}
|
}
|
||||||
|
|
||||||
track_script {
|
track_script {
|
||||||
check_maxscale
|
check_maxscale
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue