kowabunga.cloud.keepalived role – Install, configure, and start Keepalived IP failover.
Note
This role is part of the kowabunga.cloud collection (version 0.0.1).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it use: ansible-galaxy collection install kowabunga.cloud
.
To use it in a playbook, specify: kowabunga.cloud.keepalived
.
Entry point main
– Install, configure, and start Keepalived IP failover.
Synopsis
Install, configure, and start Keepalived IP failover.
Parameters
Parameter |
Comments |
---|---|
Defines whether network redundancy and virtual IP failover mechanisms must be enabled. Disabled if unspecified. Choices:
|
|
Configuration settings for failover mechanisms (useless if disabled) Default: |
|
List of hosts used as peers in a highly-available failover setup Recommended to use Ansible special variables like groups[‘ROLE’] Default: |
|
List of VRRP trackers to be configured to managed virtual IP addresses. Default: |
|
Used to determine the condition under which a given instance goes from PRIMARY to BACKUP state. If unset, failover is performed when one server fails (crash, reboot, …) Example: ‘/usr/bin/killall -0 myapp’ |
|
List of tracker configuration settings |
|
Network interface to use for VRRP messages communication. Defaults to private network one if unspecified. |
|
Network interface to use to attacj virtual IP address. Defaults to private network one if unspecified. |
|
Allows lower priority machine to maintain the master role and prevent unnecessary VIP flapping. Disabled if unspecified. Choices:
|
|
Password to authenticate VRRP messages between peers. |
|
Hostname from inventory of the expected master host. Overriden when priority is set. |
|
Enforce priority (1..250). The lower value will be selected as master host. Default: |
|
Set custom route when virtual IP is acquired. Default: |
|
Route’s destination CIDR. |
|
Route’s gateway IPv4 address. |
|
Route’s weight |
|
Virtual IP address (VIP) to be assigned, must be unique in your network. Can be used either as a simple string or a list of strings to handle multiple IP addresses. |
|
Virtual Router Identification, integer in 1..255 range. Required to be unique on a given L2/L3 segment. |
|
Tracker name |
|
Path to post-actions script, called at state change. Example: ‘/opt/keepalived-notify-myapp.sh’ |
|
Defines whether to enable fast failure detection with point-to-point Bidirectional Forwarding Detection (BFD). Enabled if unspecified. Choices:
|
|
Forces peer-to-peer unicast VRRP communication over multicast. Only supported with 2 peers failover. Disabled if unspecified. Choices:
|
|
Defines whether virtual MAC addresses (VMAC) must be used (formatted as 00:00:5e:00:00:xx). Useful if not supported by underlying network interface (e.g. VMware vSwitch with MAC address range restriction) Enabled if unspecified. Choices:
|