blob: adedcdc3c5bf4145f2b2862634c7c331d63a3696 (
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=started enabled=yes
tags: keepalived
|