Skip to content

Commit

Permalink
Reinstate vrrp
Browse files Browse the repository at this point in the history
  • Loading branch information
mergwyn committed Jul 29, 2024
1 parent 696eb09 commit e777c5e
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions site-modules/profile/manifests/app/keepalived/dns.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,27 @@
# }

# VRRP
# keepalived::vrrp::instance { 'VI_DNS':
# interface => $lan,
# lvs_interface => 'veth-dns',
# state => 'BACKUP',
# virtual_router_id => 51,
# priority => 150,
# auth_type => 'PASS',
# auth_pass => lookup('secrets::keepalived'),
# virtual_ipaddress => [ $v_ip ],
## track_interface => [ $wan, "${vpn} weight 5"], # optional, monitor these interfaces.
# #track_script => 'check_dns',
# }
keepalived::vrrp::instance { 'VI_DNS':
interface => $lan,
lvs_interface => 'veth-dns',
state => 'BACKUP',
virtual_router_id => 51,
priority => 150,
auth_type => 'PASS',
auth_pass => lookup('secrets::keepalived'),
virtual_ipaddress => [ $v_ip ],
# track_interface => [ $wan, "${vpn} weight 5"], # optional, monitor these interfaces.
#track_script => 'check_dns',
}

# Add virtual server for DNS
keepalived::lvs::virtual_server { 'VPN_DNS':
ip_address => $v_ip,
port => 53,
delay_loop => 6,
ha_suspend => true,
lb_algo => 'wrr',
lb_algo => 'wlc',
lb_kind => 'DR',
# TODO remove? persistence_timeout => 0,
protocol => 'TCP'
}

Expand All @@ -46,8 +45,8 @@
port => 53,
options => {
weight => 1,
notify_down => "'/sbin/ipvsadm -d -u ${v_ip}:53 -r ${real_ip}:53'",
notify_up => "'/sbin/ipvsadm -a -u ${v_ip}:53 -r ${real_ip}:53 -g -w 1'",
# notify_down => "'/sbin/ipvsadm -d -u ${v_ip}:53 -r ${real_ip}:53'",
# notify_up => "'/sbin/ipvsadm -a -u ${v_ip}:53 -r ${real_ip}:53 -g -w 1'",
'TCP_CHECK' => {
connect_timeout => '3',
}
Expand Down

0 comments on commit e777c5e

Please sign in to comment.