forked from ISTI-ansible-roles/ansible-roles
58 lines
1.8 KiB
YAML
58 lines
1.8 KiB
YAML
---
|
|
# http://www.keepalived.org/
|
|
#
|
|
keepalived_install: False
|
|
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_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_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: VI_1
|
|
interface: eth0
|
|
state: MASTER
|
|
vrouter_id: '{{ keepalived_vrouter_id }}'
|
|
notify: '{{ keepalived_notify_script }}'
|
|
priority: '{{ keepalived_inst_priority }}'
|
|
v_addr:
|
|
- '{{ keepalived_floating_ip1 }}'
|
|
track_script:
|
|
- '{{ keepalived_script1_name }}'
|
|
#track_interface:
|
|
# - eth0
|