feat: add keepalived (unused)
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
- name: Restart keepalived
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: keepalived
|
||||||
|
state: restarted
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
- name: Install keepalived
|
||||||
|
ansible.builtin.apt:
|
||||||
|
pkg:
|
||||||
|
- keepalived
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Install keepalived config
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: keepalived.conf.j2
|
||||||
|
dest: /etc/keepalived/keepalived.conf
|
||||||
|
mode: "0644"
|
||||||
|
notify: Restart keepalived
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
vrrp_instance VI_1 {
|
||||||
|
state MASTER
|
||||||
|
interface enp5s0
|
||||||
|
virtual_router_id 51
|
||||||
|
priority 100
|
||||||
|
advert_int 1
|
||||||
|
authentication {
|
||||||
|
auth_type PASS
|
||||||
|
auth_pass 1111
|
||||||
|
}
|
||||||
|
virtual_ipaddress {
|
||||||
|
10.150.0.100
|
||||||
|
10.150.0.101
|
||||||
|
10.150.0.102
|
||||||
|
}
|
||||||
|
|
||||||
|
# Allow packets addressed to the VIPs above to be received
|
||||||
|
accept
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user