ansible-role-docker-swarm/vars/main.yml

40 lines
1.2 KiB
YAML

---
haproxy_docker_container: True
haproxy_ha_with_keepalived: True
keepalived_install: True
keepalived_vrouter_id: '{{ docker_swarm_keepalived_vrouter_id }}'
keepalived_use_unicast: False
keepalived_floating_ip1: '{{ docker_swarm_keepalived_floating_ip }}'
keepalived_instance1_name: '{{ docker_swarm_keepalived_instance_name }}'
keepalived_nagios_check: False
keepalived_service_to_check: 'haproxy'
keepalived_script1_check: "/usr/bin/docker container ls --filter name=haproxy | /bin/grep haproxy"
keepalived_scripts:
- name: '{{ keepalived_script1_name }}'
script: '{{ keepalived_check_script }}'
# In seconds
interval: 2
# Priority increment
weight: -20
fall: 2
raise: 2
keepalived_instances:
- name: '{{ keepalived_instance1_name }}'
interface: '{{ ansible_default_ipv4.interface }}'
state: BACKUP
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:
- '{{ ansible_default_ipv4.interface }}'
authentication: PASS
authpass: '{{ keepass_auth_pwd }}'