Installs keepalived
https://keepalived.org
Andrea Dell'Amico 0e57545830 | ||
---|---|---|
defaults | ||
files | ||
handlers | ||
meta | ||
tasks | ||
templates | ||
tests | ||
vars | ||
.gitignore | ||
LICENSE | ||
README.md |
README.md
Role Name
A role that installs and configures keepalived.
Role Variables
The most important variables are listed below:
keepalived_install: True
keepalived_enabled: '{{ keepalived_install }}'
keepalived_version: 1.1.20
keepalived_repo: 'ppa:keepalived/stable'
keepalived_pkg_state: latest
# Use 'keepalived={{ keepalived_version }}' if you want a specific version
keepalived_pkgs:
- keepalived
keepalived_use_unicast: False
keepalived_unicast_src_ip: '{{ ansible_default_ipv4.address }}'
keepalived_unicast_peer_ip:
- 127.0.0.1
- 127.0.0.2
keepalived_mcast_addr: 224.0.0.0/8
keepalived_floating_ip1: 127.0.0.1
keepalived_script1_name: keepalived_check_service_status
# We set haproxy as the default because most of our keepalived use is haproxy related
keepalived_service_to_check: 'haproxy'
keepalived_script1_check: '/bin/pidof {{ keepalived_service_to_check }}'
keepalived_instance1_name: 'VRRP_1'
keepalived_interface1_name: '{{ ansible_default_ipv4.interface }}'
keepalived_initial_state: 'MASTER'
keepalived_inst_priority: 100
keepalived_vrouter_id: 51
keepalived_non_local_bind: True
keepalived_enable_script_security: True
keepalived_script_username: keepalived_script
keepalived_script_user_home: '/var/lib/keepalived'
keepalived_runtime_dir: /run/keepalived
keepalived_nagios_check: False
keepalived_notify_script: /usr/local/bin/keepalived_notify
keepalived_check_script: '/usr/local/bin/{{ keepalived_script1_name }}'
# The service must install its own script if it is too complex to be managed by the provided one
keepalived_scripts:
- name: '{{ keepalived_script1_name }}'
script: '{{ keepalived_check_script }}'
# In seconds
interval: 2
# Priority increment
weight: 2
keepalived_instances:
- name: '{{ keepalived_instance1_name }}'
interface: '{{ keepalived_interface1_name }}'
state: '{{ keepalived_initial_state }}'
vrouter_id: '{{ keepalived_vrouter_id }}'
notify: '{{ keepalived_notify_script }}'
priority: '{{ keepalived_inst_priority }}'
nopreempt: True
v_addr:
- '{{ keepalived_floating_ip1 }}'
track_script:
- '{{ keepalived_script1_name }}'
track_interface:
- '{{ keepalived_interface1_name }}'
Dependencies
None
License
EUPL-1.2
Author Information
Andrea Dell’Amico, andrea.dellamico@isti.cnr.it