From f9344467b61e3e2f2e329bbf98831d104a10f753 Mon Sep 17 00:00:00 2001 From: alecsandru Date: Fri, 3 May 2024 18:53:06 +0000 Subject: [PATCH] Update 'haproxy.yml' --- haproxy.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/haproxy.yml b/haproxy.yml index 760eb31..4ca6dfe 100644 --- a/haproxy.yml +++ b/haproxy.yml @@ -22,3 +22,25 @@ name: keepalived enabled: true state: started + - name: Config keepalived + blockinfile: + dest: /etc/keepalived/keepalived.conf + block: | + vrrp_instance VI_1 { + state MASTER + interface eth0 + virtual_router_id 101 + priority 100 + advert_int 1 + authentication { + auth_type PASS + auth_pass 1111 + } + virtual_ipaddress { + 10.10.0.2 + } + } + vrrp_script chk_apiserver { + script "/usr/bin/nc localhost 6443" + interval 5 + }