Some refinements to the keepalivedi configuration.
This commit is contained in:
parent
5dcdf0731b
commit
abc39e59bc
|
@ -33,7 +33,20 @@ keepalived_instances:
|
||||||
- '{{ keepalived_floating_ip1 }}'
|
- '{{ keepalived_floating_ip1 }}'
|
||||||
track_script:
|
track_script:
|
||||||
- '{{ keepalived_script1_name }}'
|
- '{{ keepalived_script1_name }}'
|
||||||
track_interface:
|
|
||||||
- '{{ ansible_default_ipv4.interface }}'
|
|
||||||
authentication: PASS
|
authentication: PASS
|
||||||
authpass: '{{ keepass_auth_pwd }}'
|
authpass: '{{ keepass_auth_pwd }}'
|
||||||
|
|
||||||
|
keepalived_notify_extra_params: |
|
||||||
|
case $STATE in
|
||||||
|
"MASTER") logger "This HAPROXY instance is now in MASTER state"
|
||||||
|
;;
|
||||||
|
"BACKUP") logger "This HAPROXY instance is now in BACKUP state"
|
||||||
|
ip addr del {{ keepalived_floating_ip1 }} dev {{ ansible_default_ipv4.interface }}
|
||||||
|
;;
|
||||||
|
"FAULT") logger "This HAPROXY instance went into FAULT state"
|
||||||
|
RETVAL=0
|
||||||
|
;;
|
||||||
|
*) logger "HAPROXY server is in an unknown state"
|
||||||
|
RETVAL=1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
Loading…
Reference in New Issue