blob: 08835b89f0849cbb1f36294b1c15f99c8ed5e6c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
---
- 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
|