Cookbooks
keepalived
documentation
Keepalived Virtual Server Group

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 https://www.keepalived.org/manpage.html (opens in a new tab)

Actions

  • :create
  • :delete

Properties

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

Examples

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