2019-06-02 00:04:33 +08:00
|
|
|
# to clean 'lb' service
|
|
|
|
- block:
|
2019-06-05 20:41:09 +08:00
|
|
|
- name: rm service keepalived and haproxy
|
|
|
|
service: name={{ item }} state=stopped enabled=no
|
|
|
|
with_items:
|
|
|
|
- keepalived
|
|
|
|
- haproxy
|
2019-06-02 00:04:33 +08:00
|
|
|
ignore_errors: true
|
|
|
|
|
|
|
|
- name: remove files and dirs
|
|
|
|
file: name={{ item }} state=absent
|
|
|
|
with_items:
|
|
|
|
- "/etc/haproxy"
|
|
|
|
- "/etc/keepalived"
|
|
|
|
when: "inventory_hostname in groups['kube-node'] or inventory_hostname in groups['ex-lb']"
|