Keepalived Virtual Server Group


back to resource list (opens in a new tab)

The keepalived_virtual_server_group resource can be used to manage configuration within the virtual_server_group section of keepalived.conf.

This feature offers a way to simplify your configuration by factorizing virtual server definitions. If you need to define a bunch of virtual servers with exactly the same real server topology then this feature will make your configuration much more readable and will optimize healthchecking task by only spawning one healthchecking where multiple virtual server declaration will spawn a dedicated healthchecker for every real server which will waste system resources.

More information available at (opens in a new tab)


  • :create
  • :delete


NameTypeDefaultDescriptionAllowed Values
vipsArray[]Array of Strings declaring machine IPs + Ports
fwmarksArray[]Array of Integers declaring Firewall Marks
config_directoryString/etc/keepalived/conf.ddirectory for the config file to reside in
config_fileString::File.join(config_directory, keepalived_virtual_server_group__#{name}__.conf)full path to the config file
cookbookStringkeepalivedWhich cookbook to look in for the template
sourceStringvirtual_server_group.conf.erbName of the template to render


keepalived_virtual_server_group 'http' do
  vips [' 80', ' 80']
  notifies :restart, 'service[keepalived]', :delayed