[EVO] Ajouter la source de l'unicast

This commit is contained in:
pulsar89.5 2023-09-26 16:40:09 +02:00
parent 0efc0c6887
commit 36a03a49f2
2 changed files with 3 additions and 0 deletions

View File

@ -35,4 +35,5 @@
group: root
mode: u=rw,g=r,o=r
validate: /usr/sbin/visudo -cf %s
when: "'keepalived/sudoers' is file"
become: true

View File

@ -13,6 +13,7 @@ global_defs {
smtp_connect_timeout 30
{% endif %}
script_user keepalived_script
enable_script_security
max_auto_priority 50
}
@ -41,6 +42,7 @@ vrrp_instance VIP_{{ 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'] %}