   #########################################################
  # Written Mar 03, 2008 and released under the GNU/GPLv2 ##
 # (c) Jeff Schroeder (jeffschroeder@computer.org)       # #
#########################################################  #
#                                                       #  #
# keepalived.conf - track a dummy interface and run     #  #
#                   scripts on transition. For more     #  # 
#                   info, see http://www.keepalived.org # #
#########################################################

# Anything wrapped in [% NAME %] needs to be changed to fit
# your environment.

global_defs {
	lvs_id [% SHORT_HOSTNAME %]
}

vrrp_sync_group VG1 {
	group {
		VI_1
	}

        # notify scripts and alerts are optional
        #
        # filenames of scripts to run on transitions
        # can be unquoted (if just filename)
        # or quoted (if has parameters)

        # to MASTER transition
        notify_master "/usr/local/bin/change_status master"

        # to BACKUP transition
        notify_backup "/usr/local/bin/change_status backup"

        # FAULT transition
        notify_fault "/usr/local/bin/change_status fault"
}

vrrp_instance VI_1 {
	state [% MASTER or BACKUP %]
	interface [% INTERFACE_TO_LISTEN_ON %]
	virtual_router_id [% NUMERIC_ID %]
	priority [% NUMERIC_PRIORITY %]
	advert_int 1
	authentication {
		auth_type PASS
		auth_pass 1234
	}
	track_interface {
		dummy0
	}
	virtual_ipaddress {
		[% VIRTUAL_IP_ADDRESS %]
	}
}
