mirror of https://github.com/easzlab/kubeasz.git
fix ubuntu1804安装ex-lb失败问题
parent
51b026e505
commit
ecf1d28003
|
@ -19,22 +19,6 @@
|
||||||
- /etc/haproxy
|
- /etc/haproxy
|
||||||
- /etc/keepalived
|
- /etc/keepalived
|
||||||
|
|
||||||
- name: 安装 haproxy+keepalived
|
|
||||||
package: name={{ item }} state=present
|
|
||||||
with_items:
|
|
||||||
- haproxy
|
|
||||||
- keepalived
|
|
||||||
when: 'INSTALL_SOURCE != "offline"'
|
|
||||||
|
|
||||||
# 离线安装 haproxy+keepalived
|
|
||||||
- import_tasks: offline.yml
|
|
||||||
when: 'INSTALL_SOURCE == "offline"'
|
|
||||||
|
|
||||||
- name: 修改centos的haproxy.service
|
|
||||||
template: src=haproxy.service.j2 dest=/usr/lib/systemd/system/haproxy.service
|
|
||||||
when: 'ansible_distribution in ["CentOS","RedHat","Amazon"]'
|
|
||||||
tags: restart_lb
|
|
||||||
|
|
||||||
- name: 配置 haproxy
|
- name: 配置 haproxy
|
||||||
template: src=haproxy.cfg.j2 dest=/etc/haproxy/haproxy.cfg
|
template: src=haproxy.cfg.j2 dest=/etc/haproxy/haproxy.cfg
|
||||||
tags: restart_lb
|
tags: restart_lb
|
||||||
|
@ -49,6 +33,23 @@
|
||||||
when: LB_ROLE == "backup"
|
when: LB_ROLE == "backup"
|
||||||
tags: restart_lb
|
tags: restart_lb
|
||||||
|
|
||||||
|
- name: 安装 haproxy+keepalived
|
||||||
|
package: name={{ item }} state=present
|
||||||
|
with_items:
|
||||||
|
- haproxy
|
||||||
|
- keepalived
|
||||||
|
when: 'INSTALL_SOURCE != "offline"'
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
# 离线安装 haproxy+keepalived
|
||||||
|
- import_tasks: offline.yml
|
||||||
|
when: 'INSTALL_SOURCE == "offline"'
|
||||||
|
|
||||||
|
- name: 修改centos的haproxy.service
|
||||||
|
template: src=haproxy.service.j2 dest=/usr/lib/systemd/system/haproxy.service
|
||||||
|
when: 'ansible_distribution in ["CentOS","RedHat","Amazon"]'
|
||||||
|
tags: restart_lb
|
||||||
|
|
||||||
- name: daemon-reload for haproxy.service
|
- name: daemon-reload for haproxy.service
|
||||||
shell: systemctl daemon-reload
|
shell: systemctl daemon-reload
|
||||||
tags: restart_lb
|
tags: restart_lb
|
||||||
|
|
Loading…
Reference in New Issue