purge: clean install cache and purge rgw

Signed-off-by: Sébastien Han <seb@redhat.com>
pull/659/head
Sébastien Han 2016-03-29 01:53:01 +02:00
parent 629108fbfa
commit 1eb12c4026
1 changed files with 37 additions and 0 deletions

View File

@ -143,6 +143,15 @@
systemd_unit_files.stdout != "0" and systemd_unit_files.stdout != "0" and
mds_group_name in group_names mds_group_name in group_names
- name: stop ceph rgws with systemd
service:
name: ceph-radosgw@rgw.{{ ansible_hostname }}
state: stopped
when:
ansible_os_family == 'RedHat' and
systemd_unit_files.stdout != "0" and
rgw_group_name in group_names
# before infernalis # before infernalis
- name: stop ceph osds - name: stop ceph osds
command: service ceph stop osd command: service ceph stop osd
@ -165,6 +174,13 @@
mds_group_name in group_names and mds_group_name in group_names and
systemd_unit_files.stdout == "0" systemd_unit_files.stdout == "0"
- name: stop ceph rgws
command: service ceph-radosgw stop
when:
ansible_os_family == 'RedHat' and
rgw_group_name in group_names and
systemd_unit_files.stdout == "0"
# Ubuntu 14.04 # Ubuntu 14.04
- name: stop ceph osds on ubuntu - name: stop ceph osds on ubuntu
command: stop ceph-osd id={{ item }} command: stop ceph-osd id={{ item }}
@ -188,6 +204,13 @@
ansible_distribution == 'Ubuntu' and ansible_distribution == 'Ubuntu' and
mds_group_name in group_names mds_group_name in group_names
- name: stop ceph rgws on ubuntu
command: stop ceph-radosgw id=rgw.{{ ansible_hostname }}
failed_when: false
when:
ansible_distribution == 'Ubuntu' and
rgw_group_name in group_names
- name: check for anything running ceph - name: check for anything running ceph
shell: "ps awux | grep -v grep | grep -q -- ceph-" shell: "ps awux | grep -v grep | grep -q -- ceph-"
register: check_for_running_ceph register: check_for_running_ceph
@ -334,3 +357,17 @@
notify: notify:
- remove data - remove data
- name: purge yum cache
command: yum clean all
when:
ansible_pkg_mgr == 'yum'
- name: purge dnf cache
command: dnf clean all
when:
ansible_pkg_mgr == 'dnf'
- name: clean apt
shell: apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
when:
ansible_pkg_mgr == 'apt'