mirror of https://github.com/easzlab/kubeasz.git
minor fix for cleaning haproxy&keepalived
parent
c3e1984d0d
commit
7a97837901
|
@ -1,10 +1,17 @@
|
|||
# to clean 'lb' service
|
||||
- block:
|
||||
- name: rm service keepalived and haproxy
|
||||
service: name={{ item }} state=stopped enabled=no
|
||||
with_items:
|
||||
- keepalived
|
||||
- haproxy
|
||||
- name: get service info
|
||||
shell: 'systemctl list-units --type=service |grep -E "haproxy|keepalived|ssh"'
|
||||
register: service_info
|
||||
|
||||
- name: remove service haproxy
|
||||
service: name=haproxy state=stopped enabled=no
|
||||
when: '"haproxy" in service_info.stdout'
|
||||
ignore_errors: true
|
||||
|
||||
- name: remove service keepalived
|
||||
service: name=keepalived state=stopped enabled=no
|
||||
when: '"keepalived" in service_info.stdout'
|
||||
ignore_errors: true
|
||||
|
||||
- name: remove files and dirs
|
||||
|
|
Loading…
Reference in New Issue