]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
purge: clean install cache and purge rgw 659/head
authorSébastien Han <seb@redhat.com>
Mon, 28 Mar 2016 23:53:01 +0000 (01:53 +0200)
committerSébastien Han <seb@redhat.com>
Mon, 28 Mar 2016 23:59:24 +0000 (01:59 +0200)
Signed-off-by: Sébastien Han <seb@redhat.com>
purge-cluster.yml

index 14f272e2c09c9ba3de55efef099860dd7675e91a..b64f34c7cd336c9a9890f1a93c9f0575a52e32d9 100644 (file)
       systemd_unit_files.stdout != "0" and
       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
   - name: stop ceph osds
     command: service ceph stop osd
       mds_group_name in group_names and
       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
   - name: stop ceph osds on ubuntu
     command: stop ceph-osd id={{ item }}
       ansible_distribution == 'Ubuntu' and
       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
     shell: "ps awux | grep -v grep | grep -q -- ceph-"
     register: check_for_running_ceph
     notify:
       - 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'