25 lines
560 B
Django/Jinja
25 lines
560 B
Django/Jinja
vrrp_track_process track_k3s {
|
|
process k3s-server
|
|
weight 100
|
|
}
|
|
|
|
vrrp_instance rpis_vip {
|
|
state {% if ansible_hostname == 'node0' %}MASTER{% else %}BACKUP{% endif %}
|
|
|
|
interface eth0
|
|
virtual_router_id 1{{ ansible_hostname[-1] }}
|
|
priority {% if ansible_hostname == 'node0' %}11{% else %}10{% endif %}
|
|
|
|
advert_int 1
|
|
authentication {
|
|
auth_type PASS
|
|
auth_pass 5up3r53cr3tPW!
|
|
}
|
|
virtual_ipaddress {
|
|
192.168.1.10/24
|
|
}
|
|
track_process {
|
|
track_k3s
|
|
}
|
|
}
|