You've already forked role_keepalived
Merge pull request 'unicast_peer' (#2) from unicast_peer into master
Reviewed-on: #2
This commit is contained in:
@@ -13,6 +13,7 @@ global_defs {
|
||||
smtp_connect_timeout 30
|
||||
{% endif %}
|
||||
|
||||
script_user keepalived_script
|
||||
enable_script_security
|
||||
max_auto_priority 50
|
||||
}
|
||||
@@ -40,6 +41,17 @@ vrrp_instance VIP_{{ keepalived_uid }} {
|
||||
virtual_router_id {{ keepalived_uid }}
|
||||
advert_int 1
|
||||
|
||||
{% if keepalived_peers | length > 0 %}
|
||||
unicast_src_ip {{ ansible_facts[keepalived_interface]['ipv4']['address'] }}
|
||||
unicast_peer {
|
||||
{% for peer in keepalived_peers %}
|
||||
{% if peer != ansible_facts[keepalived_interface]['ipv4']['address'] %}
|
||||
{{ peer }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{% if keepalived_ipv4 | length > 0 %}
|
||||
virtual_ipaddress {
|
||||
{{ keepalived_ipv4 }} dev {{ keepalived_interface }} scope global
|
||||
@@ -52,6 +64,10 @@ vrrp_instance VIP_{{ keepalived_uid }} {
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{% if keepalived_notify_script_enabled %}
|
||||
notify /etc/keepalived/notify.sh
|
||||
{% endif %}
|
||||
|
||||
{% if keepalived_track_scripts | length > 0 %}
|
||||
track_script {
|
||||
{% for script in keepalived_track_scripts %}
|
||||
|
Reference in New Issue
Block a user