Keepalived Global Defs


back to resource list (opens in a new tab)

The keepalived_global_defs resource can be used to manage configuration within the global_defs section of keepalived.conf.

More information available at (opens in a new tab)


  • :create
  • :delete


NameTypeDefaultDescriptionAllowed Values
notification_emailArraynilSet of email To: notify
notification_email_fromStringnilemail from address that will be in the header
smtp_serverStringnilRemote SMTP server used to send notification email
smtp_helo_nameStringnilName to use in HELO messages
smtp_connect_timeoutIntegernilSMTP server connection timeout in seconds
router_idStringnilString identifying the machine
vrrp_mcast_group4StringnilMulticast Group to use for IPv4 VRRP adverts
vrrp_mcast_group6StringnilMulticast Group to use for IPv6 VRRP adverts
vrrp_garp_master_delayIntegernildelay for second set of gratuitous ARPs after transition to MASTER
vrrp_garp_master_repeatIntegernilnumber of gratuitous ARP messages to send at a time after transitioning to MASTER
vrrp_garp_master_refreshIntegernilminimum time interval for refreshing gratuitous ARPs while MASTER
vrrp_versionIntegernilSet the default VRRP version to use2 or 3
vrrp_iptablesStringnilSpecify the iptables chain for v3 vrrp
vrrp_check_unicast_srcStringnilThe following enables checking that when in unicast mode
vrrp_strictTrue, FalsenilEnforce strict VRRP protocol compliance
vrrp_priorityIntegernilSet the vrrp child process priority (Negative values increase priority)between -20 and 19
checker_priorityIntegernilSet the checker child process prioritybetween -20 and 19
vrrp_no_swapTrue, FalsenilSet the vrrp child process non swappable
checker_no_swapTrue, FalsenilSet the checker child process non swappable
snmp_socketStringnilSpecify socket to use for connecting to SNMP master agent
enable_snmp_checkerTrue, Falsenilenable SNMP handling of checker element of KEEPALIVED MIB
enable_snmp_rfcTrue, Falsenilenable SNMP handling of RFC2787 and RFC6527 VRRP MIBs
enable_snmp_rfcv2True, Falsenilenable SNMP handling of RFC2787 VRRP MIB
enable_snmp_rfcv3True, Falsenilenable SNMP handling of RFC2787 VRRP MIB
enable_trapsTrue, Falsenilenable SNMP traps
enable_script_securityTrue, FalsenilDon't run scripts configured to be run as root if any part of the path is writable by a non-root user
extra_optionsHashnilA hash of additional options for the config file that are not yet exposed as properties
config_directoryString/etc/keepalived/conf.ddirectory for the config file to reside in
config_fileString::File.join(config_directory, 'global_defs.conf')full path to the config file
cookbookStringkeepalivedWhich cookbook to look in for the template
sourceStringglobal_defs.conf.erbName of the template to render


keepalived_global_defs 'global_defs' do
  notification_email %w( )
  notification_email_from "keepalived@#{node['name']}"
  router_id node['name']
  enable_traps true
  notifies :restart, 'service[keepalived]', :delayed