- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with the keepalived module
- Reference - Types reference and additional functionalities
- Hiera integration
- Contact
Module to manage Keepalived configuration and runtime. All configuration can be driven via Hiera.
The keepalived module allows to automate the configuration and deployment of the keepalived daemon.
The include the main class as follows:
include keepalived
keepalived
include keepalived
Keepalived main options.
Keepalied globals configurations.
List of static IP addresses.
List of static rules.
List of static routes.
VRRP scripts.
VRRP sync groups.
GARP groups.
VRRP instances.
VRRP server groups.
VRRP servers.
Path to the configuration directory. Defaults to /etc/keepalived
.
Whether we should purge unmanaged resources under the keepalived's configuration directory. Defaults to true
.
Path to the keepalived configuration file. Defaults to $config_dir/keepalived.conf
.
Whether we should manage keepalived's configuration file or not. Defaults to true
.
Installation packages for keepalived.
Defaults to:
keepalived::packages:
"keepalived": {}
Keepalived service name. Defaults to keepalived
.
Whether we should manage the service runtime or not. Defaults to true
.
Whether the resource is running or not. Valid values are running
, stopped
. Defaults to running
.
Whether the service is onboot enabled or not. Defaults to true
.
keepalived::config_block
manages a snippet configuration block
keepalived::config_block {"block_id": .. }
Configuration order.
Configuration block ID (global_defs, virtual_server etc.).
Configuration block name.
Configuration options.
Whether the resource is present or not. Valid values are present
, absent
. Defaults to present
.
keepalived::garp_group
manages gratuitous ARPs (GARP) groups.
keepalived::garp_group {"group_name": .. }
Sets the interval between Gratuitous ARP (in seconds, resolution microseconds).
Sets the interval between unsolicitated NA (in seconds, resolution microseconds).
The physical interface to which the intervals apply.
A list of interfaces across which the delays are aggregated.
Whether the resource is present or not. Valid values are present
, absent
. Defaults to present
.
keepalived::vrrp_script
manages VRRP scripts.
keepalived::vrrp_script {"script_name": .. }
Script to run periodically.
Run the script this every seconds.
Script considered failed after 'timeout' seconds.
Adjust priority by this weight.
Required number of failures fo KO switch.
Required number of successes fo OK switch.
Specify user/group to run script under.
Assume script initially is in failed state. Valid values are true
, false
.
Whether the resource is present or not. Valid values are present
, absent
. Defaults to present
.
keepalived::vrrp_sync_group
manages VRRP sync groups.
keepalived::vrrp_sync_group {"group_name": .. }
Group of VRRP instances to sync together.
Script to run during MASTER transit.
Script to run during BACKUP transit.
Script to run during FAULT transit.
Script to run during ANY state transit.
Send email notification during state transit.
Whether the resource is present or not. Valid values are present
, absent
. Defaults to present
.
keepalived::vrrp_instance
manages VRRP instances.
keepalived::vrrp_instance {"instance_name": .. }
Use VRRP virtual mac.
VRRP version to use. Valid values are 1
, 2
.
Send/receive VRRP messages from base interface instead of VMAC interface.
Start-up default state. Valid values are MASTER
, BACKUP
.
Binding interface.
Allow a non address-owner to process packets destined to VIPs and eVIPs. Valid values are true
, false
.
Set non-accept mode. Valid values are true
, false
.
List of interfaces state to monitor.
List of scripts state to monitor.
Ignore VRRP interface faults. Valid values are true
, false
.
Source IP to use into the VRRP packets.
Source IP to use into the VRRP packets.
List of IP addresses to advert.
Delay in seconds for second set of gratuitous ARP messages after MASTER state transition.
How many gratuitous ARP messages after MASTER state transition should be sent.
Delay for second set of gratuitous ARPs after lower priority advert received when MASTER.
Number of gratuitous ARP messages to send at a time after lower priority advert received when MASTER.
Periodic delay in seconds sending ratuitous ARP while in MASTER state.
How many gratuitous ARP messages should be sent at each periodic repeat.
VRRP virtual router ID.
VRRP priority.
VRRP advert interval.
Disable advert sending if a lower priority advert is received. Valid values are true
, false
.
Disable advert sending if a higher priority advert is received. Valid values are true
, false
.
VRRP authentication.
List of IP addresses to use in the VRRP instance.
List of IP addresses excluded from VRRP packets.
Set the promote secondaries flag on the interface to stop other addresses in the same CIDR from being removed when any of them is removed. Valid values are true
, false
.
VRRP virtual routes.
VRRP virtual rules.
Override VRRP RFC preemption default. Valid values are true
, false
.
Seconds after startup or seeing a lower priority master until preemption. Valid values are 0-1000
.
Enable VRRP sctrict mode. Valid values are true
, false
.
Set debug level. Valid values are 0-4
.
Script to run during MASTER transit.
Script to run during BACKUP transit.
Script to run during FAULT transit.
Script to run during ANY state transit.
Send email notification during state transit.
Whether the resource is present or not. Valid values are present
, absent
. Defaults to present
.
keepalived::virtual_server
manages virtual servers.
keepalived::virtual_server {"server_name": .. }
Virtual server type. Valid values are ip
, fwmark
, group
. Defaults to ip
.
Address family. Valid values are inet
, inet6
. Defaults to inet
.
Delay timer for service polling
LV scheduled used. Valid values are rr
, wrr
, lc
, wlc
, lblc
, sh
, dh
, fo
, ovf
, lblcr
, sed
, nq
.
Apply hashing. Valid values are true
, false
.
Apply scheduler flag 1. Valid values are true
, false
.
Apply scheduler flag 2. Valid values are true
, false
.
Apply scheduler flag 3. Valid values are true
, false
.
Apply sh-port scheduler flag. Valid values are true
, false
.
Apply sh-fallback scheduler flag. Valid values are true
, false
.
Apply one packet scheduling (only for UDP). Valid values are true
, false
.
LVS method to use. Valid values are NAT
, DR
, TUN
.
LVS persistence engine name.
LVS persistence timeout.
LVS granularity mask.
L4 protocol. Valid values are TCP
, UDP
, SCTP
.
Suspend heath checks if virtual server's IP address is not set. Valid values are true
, false
.
VirtualHost string to use for HTTP_GET or SSL_GET checks.
Assume silently all real servers down and health checks failed on start. Valid values are true
, false
.
Consider quorum and real servers down on daemon shutdown. Valid values are true
, false
.
Minimum total weight of all live servers in the pool necessary to operate the virtual server with no quality regression.
Tolerate this much weight units compared to the nominal quorum when considering quorum gain or loss.
Script to launch when quorum is gained.
Script to launch when quorum is lost.
Real server to add to the virtual server topology when all real servers are down.
Apply the inhbit_on_failure behaviour to the sorry_server directive. Valid values are true
, false
.
LVS method to use for sorry server. Valid values are NAT
, DR
, TUN
.
List of real servers that belong to this virtual server.
Whether the resource is present or not. Valid values are present
, absent
. Defaults to present
.
keepalived::real_server
manages real servers.
keepalived::real_server {"server_name": .. }
Weight to use.
LVS method to use. Valid values are NAT
, DR
, TUN
.
Set weight to 0 upon health checks failures. Valid values are true
, false
.
Script to launch when health check consider service as up.
Script to launch when health check consider service as down.
HTTP heath check.
SSL heath check.
TCP heath check.
SMTP heath check.
DNS heath check.
MISC heath check.
You should define your configuration in Hiera. See the example below.
keepalived::global_defs:
notification_email:
- '[email protected]'
notification_email_from: '[email protected]'
keepalived::vrrp_sync_groups:
"VG_1":
group:
- V1_1
- V1_2
notify_master: "/bin/true"
keepalived::vrrp_instances:
"VI_1":
state: MASTER
interface: eno1
virtual_router_id: 1
priority: 100
advert_int: 1
authentication:
auth_type: PASS
auth_pass: secret
virtual_ipaddress:
- 10.0.0.1/24
"VI_2":
state: MASTER
interface: eno2
virtual_router_id: 2
priority: 100
advert_int: 1
authentication:
auth_type: PASS
auth_pass: secret
virtual_ipaddress:
- 10.0.1.1/24
Matteo Cerutti - [email protected]