Skip to main content

Keepalived Role

Install and configure keepalived for a virtual IP (VRRP).


Variables​

VariableTypeOptionsDefaultDescription
keepalived_service_namestring---keepalived.servicesystemd service unit name
keepalived_service_statestringreloaded, restarted, started, stoppedstarteddesired state of the keepalived service
keepalived_service_enabledbooltrue, falsetruewhether the keepalived service is enabled at boot
keepalived_package_statestringpresent, absent, latestpresentdesired state of keepalived packages
keepalived_packagelist of string---["keepalived"]list of packages to install
keepalived_config_pathstring---/etc/keepalived/keepalived.confpath to the keepalived configuration file
keepalived_config_virtual_ipstring---virtual IP address to manage
keepalived_config_interfacestring---eth0network interface for VRRP advertisements
keepalived_config_priorityinteger---255VRRP priority (higher wins election)
keepalived_config_virtual_router_idinteger---100VRRP virtual router ID
keepalived_config_vrrp_instancestring---VGVRRP instance name
keepalived_config_statestring---MASTERinitial VRRP state (MASTER or BACKUP)