Cookbooks
keepalived
documentation
Keepalived Vrrp Sync Group

keepalived_vrrp_sync_group

back to resource list (opens in a new tab)

The keepalived_vrrp_sync_group resource can be used to configure VRRP Sync Groups (groups of resources that fail over together).

More information available at https://www.keepalived.org/manpage.html (opens in a new tab)

Actions

  • :create
  • :delete

Properties

NameTypeDefaultDescriptionAllowed Values
notify_masterStringnilScript to run for notifications when transitioning to state of master
notify_backupStringnilScript to run for notifications when transitioning to state of backup
notify_faultStringnilScript to run for notifications when transitioning to state of fault
notifyStringnilScript to run for notifications when any transition of state happens
smtp_alerttrue, falsenilSend email notification during state transition
groupArray(Required) name of the vrrp_instance
config_directoryString/etc/keepalived/conf.ddirectory for the config file to reside in
config_fileString::File.join(config_directory, 'keepalived_vrrp_sync_group__#{name}__.conf')full path to the config file
cookbookStringkeepalivedWhich cookbook to look in for the template
sourceStringvrrp_sync_group.conf.erbName of the template to render

Examples

keepalived_vrrp_sync_group 'myGroup' do
  group %w(internal_systems external_clients)
  notify_master '/path/to_master.sh'
  notify_backup '/path/to_backup.sh'
  notify_fault  '/path/fault.sh'
  notify        '/path/notify.sh'
  notifies :restart, 'service[keepalived]', :delayed
end