]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Use yum and apt modules instead of package to provide Ansible <2.0 support; fix typo
authorKGoreczny <krzysztof.goreczny@intel.com>
Mon, 15 Feb 2016 15:01:00 +0000 (16:01 +0100)
committerKGoreczny <krzysztof.goreczny@intel.com>
Mon, 15 Feb 2016 15:01:00 +0000 (16:01 +0100)
Signed-off-by: KGoreczny <krzysztof.goreczny@intel.com>
purge-cluster.yml

index b531a6dd8689ddf4156e38c560187505b3318ba8..ec9a44c268bfe987ada5640ed5abcd3c2fcac485 100644 (file)
@@ -11,7 +11,7 @@
 
   vars:
 # When set to true both groups of packages are purged.
-# This can couse problem with qemu-kvm
+# This can cause problem with qemu-kvm
     purge_all_packages: true
 
     ceph_packages:
     when:
      osd_group_name in group_names
 
-  - name: purge ceph packages
-    package:
+  - name: purge ceph packages with yum
+    yum:
       name: "{{ item }}"
       state: absent
     with_items:
       - "{{ ceph_packages }}"
+    when:
+      ansible_distribution != 'Ubuntu'
 
-  - name: purge remaining ceph packages
-    package:
+  - name: purge ceph packages with apt
+    apt:
+      name: "{{ item }}"
+      state: absent
+    with_items:
+      - "{{ ceph_packages }}"
+    when:
+      ansible_distribution == 'Ubuntu'
+
+  - name: purge remaining ceph packages with yum
+    yum:
       name: "{{ item }}"
       state: absent
     with_items:
       - "{{ ceph_remaining_packages }}"
     when:
+      ansible_distribution != 'Ubuntu' and
+      purge_all_packages == true
+
+  - name: purge remaining ceph packages with apt
+    apt:
+      name: "{{ item }}"
+      state: absent
+    with_items:
+      - "{{ ceph_remaining_packages }}"
+    when:
+      ansible_distribution == 'Ubuntu' and
       purge_all_packages == true
 
   - name: remove config