Add section for purging rgw loadbalancer in purge-cluster.yml

Signed-off-by: guihecheng <guihecheng@cmiot.chinamobile.com>
pull/4058/head
guihecheng 2019-03-01 15:51:43 +08:00 committed by Guillaume Abrioux
parent 96c346743b
commit 59e702ec39
1 changed files with 54 additions and 2 deletions

View File

@ -207,6 +207,26 @@
failed_when: false
when: ansible_service_mgr == 'systemd'
- name: purge rgwloadbalancer cluster
vars:
rgwloadbalancer_group_name: rgwloadbalancers
hosts:
- "{{ rgwloadbalancer_group_name|default('rgwloadbalancers') }}"
gather_facts: false # Already gathered previously
become: true
tasks:
- name: stop rgwloadbalancer services
service:
name: ['keepalived', 'haproxy']
state: stopped
enabled: no
failed_when: false
- name: purge ceph rgw cluster
@ -575,6 +595,10 @@
- python-rados
- python-rbd
extra_packages:
- keepalived
- haproxy
hosts:
- "{{ mon_group_name|default('mons') }}"
- "{{ osd_group_name|default('osds') }}"
@ -651,10 +675,38 @@
- ansible_pkg_mgr == 'apt'
- purge_all_packages | bool
- name: purge extra packages with yum
yum:
name: "{{ extra_packages }}"
state: absent
when:
- ansible_pkg_mgr == 'yum'
- purge_all_packages == true
- name: purge extra packages with dnf
dnf:
name: "{{ extra_packages }}"
state: absent
when:
- ansible_pkg_mgr == 'dnf'
- purge_all_packages == true
- name: purge extra packages with apt
apt:
name: "{{ extra_packages }}"
state: absent
when:
- ansible_pkg_mgr == 'apt'
- purge_all_packages == true
- name: remove config
file:
path: /etc/ceph
path: "{{ item }}"
state: absent
with_items:
- /etc/ceph
- /etc/keepalived
- /etc/haproxy
- name: remove logs
file: