blob: 771faa72e9d26d2e886022659359ea575581933c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
---
- name: Install keepalived
yum: name=keepalived state=present
notify: restart keepalived
- name: Configure net.ipv4.ip_nonlocal_bind with sysctl
sysctl: name="net.ipv4.ip_nonlocal_bind" value=1 state=present sysctl_set=yes
- name: Ensure firewalld is running
service: name=firewalld state=started enabled=yes
- name: Configure firewalld
firewalld: rich_rule="rule protocol value=vrrp accept" state="enabled" permanent="true" immediate="true"
- name: Install configuration
template: src=keepalived.conf.j2 dest=/etc/keepalived/keepalived.conf owner=root group=root mode=0600
tags: keepalived
notify: restart keepalived
- name: Start keepalived
service: name=keepalived state=running
tags: keepalived
|