2024-03-09 21:34:20 +00:00
|
|
|
# {{ ansible_managed }}
|
|
|
|
global_defs {
|
2024-03-10 18:42:38 +00:00
|
|
|
script_user keepalived_script
|
2024-03-09 21:34:20 +00:00
|
|
|
enable_script_security
|
|
|
|
}
|
|
|
|
|
|
|
|
vrrp_instance {{ deploy_keepalived_vrrp_instance_name }} {
|
|
|
|
interface {{ deploy_keepalived_interface }}
|
|
|
|
|
|
|
|
state {{ deploy_keepalived_state }}
|
|
|
|
virtual_router_id {{ deploy_keepalived_router_id }}
|
|
|
|
priority {{ deploy_keepalived_priority }}
|
|
|
|
advert_int {{ deploy_keepalived_advert_interval }}
|
|
|
|
|
|
|
|
nopreempt
|
|
|
|
|
|
|
|
{% if deploy_keepalived_unicast_peers %}
|
|
|
|
unicast_src_ip {{ deploy_keepalived_unicast_source }}
|
|
|
|
unicast_peer {
|
|
|
|
{% for peer in deploy_keepalived_unicast_peers %}
|
|
|
|
{{ peer }}
|
|
|
|
{% endfor %}
|
|
|
|
}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
authentication {
|
|
|
|
auth_type PASS
|
|
|
|
auth_pass {{ deploy_keepalived_auth_passwd }}
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual_ipaddress {
|
|
|
|
{% for vip in deploy_keepalived_virtual_ips %}
|
|
|
|
{{ vip }}
|
|
|
|
{% endfor %}
|
|
|
|
}
|
|
|
|
|
|
|
|
notify {{ deploy_keepalived_scripts_dir }}/{{ deploy_keepalived_notify_script }}
|
2024-03-10 18:42:38 +00:00
|
|
|
}
|