mirror of https://github.com/ceph/ceph-ansible.git
Add section for purging rgw loadbalancer in purge-cluster.yml
Signed-off-by: guihecheng <guihecheng@cmiot.chinamobile.com>pull/4058/head
parent
96c346743b
commit
59e702ec39
|
@ -207,6 +207,26 @@
|
||||||
failed_when: false
|
failed_when: false
|
||||||
when: ansible_service_mgr == 'systemd'
|
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
|
- name: purge ceph rgw cluster
|
||||||
|
|
||||||
|
@ -575,6 +595,10 @@
|
||||||
- python-rados
|
- python-rados
|
||||||
- python-rbd
|
- python-rbd
|
||||||
|
|
||||||
|
extra_packages:
|
||||||
|
- keepalived
|
||||||
|
- haproxy
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
- "{{ mon_group_name|default('mons') }}"
|
- "{{ mon_group_name|default('mons') }}"
|
||||||
- "{{ osd_group_name|default('osds') }}"
|
- "{{ osd_group_name|default('osds') }}"
|
||||||
|
@ -651,10 +675,38 @@
|
||||||
- ansible_pkg_mgr == 'apt'
|
- ansible_pkg_mgr == 'apt'
|
||||||
- purge_all_packages | bool
|
- 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
|
- name: remove config
|
||||||
file:
|
file:
|
||||||
path: /etc/ceph
|
path: "{{ item }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
with_items:
|
||||||
|
- /etc/ceph
|
||||||
|
- /etc/keepalived
|
||||||
|
- /etc/haproxy
|
||||||
|
|
||||||
- name: remove logs
|
- name: remove logs
|
||||||
file:
|
file:
|
||||||
|
|
Loading…
Reference in New Issue