CloudRouterDemo

This commit is contained in:
ayurishchev committed 2025-11-17 14:19:38 +03:00
commit 62c86b96ff
23 files changed
+1382

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
---
- name: Install Keepalived
apt:
name: keepalived
state: present
- name: Configure Keepalived
template:
src: keepalived.conf.j2
dest: /etc/keepalived/keepalived.conf
mode: '0644'
- name: Enable and start Keepalived
systemd:
name: keepalived
enabled: yes
state: restarted
@@ -0,0 +1,19 @@
vrrp_instance VI_1 {
interface eth1
state BACKUP
# set priority
priority {% if inventory_hostname == 'router1' %}101{% else %}100{% endif %}
# set VRRP Router ID
virtual_router_id 51
advert_int 1
authentication {
auth_type PASS
auth_pass secret123
}
virtual_ipaddress {
{{ vrrp_vip }}/{{ lan_network_prefix }}
}
}