Created
April 15, 2021 18:34
-
-
Save tlhakhan/0e7cd84563a3d5248a7a4501454ae6c7 to your computer and use it in GitHub Desktop.
keepalived example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global_defs { | |
enable_script_security | |
} | |
vrrp_script check_script { | |
script "/usr/bin/systemctl is-active {{ .ServiceName }}.service" | |
weight 10 | |
interval 3 | |
fall 1 | |
rise 3 | |
user root root | |
} | |
vrrp_instance {{ .VirtualRouterInstanceName }} { | |
state BACKUP | |
preempt | |
interface {{ .InterfaceName }} | |
virtual_router_id {{ .VirtualRouterID }} | |
priority 100 | |
advert_int 1 | |
virtual_ipaddress { | |
{{ .SharedIP }} | |
} | |
authentication { | |
auth_type PASS | |
auth_pass {{ .SharedPassword }} | |
} | |
track_script { | |
check_script | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment