Skip to content

Instantly share code, notes, and snippets.

@davidc0le
Created March 14, 2018 18:58
Show Gist options
  • Save davidc0le/bb027d569d0d23857bdc5828e4fca526 to your computer and use it in GitHub Desktop.
Save davidc0le/bb027d569d0d23857bdc5828e4fca526 to your computer and use it in GitHub Desktop.
keepalived example configuration
global_defs {
notification_email {
youremail@domain.com
}
notification_email_from noreply@domain.com
smtp_server localhost
smtp_connect_timeout 30
}
vrrp_instance portal {
state master
interface eth0
# the virtual router id must be unique to each vrrp instance that you define
virtual_router_id 41
# set the value of priority higher on the master server than on a backup server
priority 200
advert_int 1
authentication {
auth_type pass
auth_pass 1066
}
virtual_ipaddress {
10.64.19.240/24
}
}
vrrp_instance database {
state backup
interface eth0
# the virtual router id must be unique to each vrrp instance that you define
virtual_router_id 42
# set the value of priority higher on the master server than on a backup server
priority 100
advert_int 1
authentication {
auth_type pass
auth_pass 1066
}
virtual_ipaddress {
10.64.19.241/24
}
}
global_defs {
notification_email {
youremail@domain.com
}
notification_email_from noreply@domain.com
smtp_server localhost
smtp_connect_timeout 30
}
vrrp_instance portal {
state backup
interface eth0
# the virtual router id must be unique to each vrrp instance that you define
virtual_router_id 41
# set the value of priority higher on the master server than on a backup server
priority 100
advert_int 1
authentication {
auth_type pass
auth_pass 1066
}
virtual_ipaddress {
10.64.19.240/24
}
}
vrrp_instance database {
state master
interface eth0
# the virtual router id must be unique to each vrrp instance that you define
virtual_router_id 42
# set the value of priority higher on the master server than on a backup server
priority 200
advert_int 1
authentication {
auth_type pass
auth_pass 1066
}
virtual_ipaddress {
10.64.19.241/24
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment