fix centos安装keepalived和haproxy问题

pull/29/head
jmgao 2017-12-15 19:14:39 +08:00
parent 1ba3b72539
commit 59d8ac5379
1 changed files with 6 additions and 1 deletions

View File

@ -18,7 +18,7 @@
file: name=/etc/haproxy state=directory
- name: 创建haproxy工作目录
file: name=/run/haproxy state=directory
file: name=/run/haproxy state=directory owner=haproxy group=haproxy
- name: 配置 haproxy
template: src=haproxy.cfg.j2 dest=/etc/haproxy/haproxy.cfg
@ -31,6 +31,11 @@
yum: name=keepalived state=latest
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"
# CentOS 需要安装psmisc 才能使用命令killall它在keepalive的监测脚本中使用到
- name: yum安装 psmisc
yum: name=psmisc state=latest
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"
- name: 创建keepalived配置目录
file: name=/etc/keepalived state=directory