Merge pull request #926 from jsaintrocc/purge-local-sudo

Fix local_action Requiring Root and Various Small Fixes
pull/927/head
Leseb 2016-08-10 08:53:10 +02:00 committed by GitHub
commit 68f6d0a52c
1 changed files with 10 additions and 6 deletions

View File

@ -293,15 +293,18 @@
osd_group_name in group_names osd_group_name in group_names
- name: remove osd mountpoint tree - name: remove osd mountpoint tree
shell: rm -rf /var/lib/ceph/osd file:
path: /var/lib/ceph/osd/
state: absent
register: remove_osd_mountpoints register: remove_osd_mountpoints
failed_when: false ignore_errors: true
when: when:
osd_group_name in group_names osd_group_name in group_names
- name: remove monitor store and bootstrap keys - name: remove monitor store and bootstrap keys
shell: rm -rf /var/lib/ceph/ file:
failed_when: false path: /var/lib/ceph/
state: absent
when: when:
mon_group_name in group_names mon_group_name in group_names
@ -313,7 +316,7 @@
- remove data - remove data
when: when:
osd_group_name in group_names and osd_group_name in group_names and
remove_osd_mountpoints.rc != 0 remove_osd_mountpoints.failed is defined
- name: see if ceph-disk is installed - name: see if ceph-disk is installed
shell: "which ceph-disk" shell: "which ceph-disk"
@ -322,7 +325,7 @@
- name: zap osd disks - name: zap osd disks
shell: ceph-disk zap "{{ item }}" shell: ceph-disk zap "{{ item }}"
with_items: devices with_items: "{{ devices | default([]) }}"
when: when:
osd_group_name in group_names and osd_group_name in group_names and
ceph_disk_present.rc == 0 and ceph_disk_present.rc == 0 and
@ -423,6 +426,7 @@
- name: request data removal - name: request data removal
local_action: shell echo requesting data removal local_action: shell echo requesting data removal
become: false
notify: notify:
- remove data - remove data