/
main.yml
89 lines (76 loc) · 3.78 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---
# Copyright 2015, Jean-Philippe Evrard <jean-philippe@evrard.me>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Wheter to add {{ ansible_managed }} information on top of keepalived.conf
keepalived_show_ansible_managed: false
# If running keepalived with SELinux, you could need to compile your
# rules. Please override this list with path to files to compile.
keepalived_selinux_compile_rules:
- keepalived_ping
- keepalived_setpgid
#keepalived_package_state: "latest"
keepalived_package_state: "{{ ( (keepalived_use_latest_stable | default(true)) | bool) | ternary('latest','present') }}"
# Keepalived scripts can be defined that trigger notification scripts.
# Examples have been provided below and in the tests directory.
# keepalived_scripts:
#haproxy_check_script:
# check_script: "/etc/keepalived/haproxy_check.sh"
# ##if a src_check_script is defined, it will be uploaded from src_check_script
# ##on the deploy host to the check_script location. If the check_script needs
# ##parameters, you can define the location under dest_check_script.
# src_check_script: "{{ playbook_dir }}/../scripts/keepalived_haproxy_check.sh"
#haproxy_check_script:
# Here is an example with a command instead of a script.
# Add src_check_script if you want to run a script instead of a command
#check_script: "killall -0 haproxy"
keepalived_scripts: {}
# Keepalived scripts may rely upon additional packages.
keepalived_scripts_packages: []
#This is the expiration time of your package manager cache.
#When expired, this role will require to update the package manger cache.
#This variable will be removed when the ansible upstream bugs will be fixed.
cache_timeout: 600
keepalived_instances: {}
keepalived_sync_groups: {}
keepalived_bind_on_non_local: False
# In case of VIP failover some applications might stuck on retrying to send
# data without updating ARP. This variable defines amount of retries kernel
# will send before consider connection as dead. It will influence on VIP
# failover speed directly. Default sysctl value is 15 which result in
# ~13 minutes of recovery. 8 retires is minimum according to RFC 1122 and
# results in 100 seconds for timeout. Oracle suggest a value of 3 for a RAC
# configuration which might be too agressive for some scenarios.
keepalived_sysctl_tcp_retries: 8
# This list of strings will appear in the global_defs section of the
# keepalived configuration file.
# Example:
#keepalived_global_defs:
# - enable_script_security
# Whether to add systemd overrides for keepalived:
# Wants=network-online.target
# After=network-online.target
keepalived_systemd_overrides: True
# Whether to add systemd option Restart=always
# It depends on bool keepalived_systemd_overrides, so to add both must be True
keepalived_systemd_override_service_restart: False
# Set location of keepalived daemon options file path
# For Debian based systems it's usually /etc/default/keepalived
# For RedHat based systems it's usually /etc/sysconfig/keepalived
keepalived_daemon_options_file_path: "{{ _keepalived_daemon_options_file_path }}"
# Overriding keepalived daemon extra arguments, which will be applied inside of
# the keepalived_daemon_options_file_path variable.
# Example:
#keepalived_daemon_default_options_overrides:
# - "DAEMON_ARGS='--snmp'"
keepalived_daemon_default_options_overrides: []