purge: fix purge of lvm devices

using `shell` module seems to be the only way to make this task working
on rhel based distribution AND debian based distributions.

on ubuntu, using `command` ansible module fails like following
(not due to `sudo` usage or not):
```
ok: [osd1] => changed=false
  cmd: command -v ceph-volume
  failed_when_result: false
  msg: '[Errno 2] No such file or directory: ''command'': ''command'''
  rc: 2
```

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1653307

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 89f77589fa)
pull/3670/head
Guillaume Abrioux 2019-03-01 12:27:00 +01:00 committed by mergify[bot]
parent 2393d82306
commit 255eab59ac
1 changed files with 1 additions and 1 deletions

View File

@ -304,7 +304,7 @@
register: ceph_lockbox_partition_to_erase_path
- name: see if ceph-volume is installed
command: "command -v ceph-volume"
shell: "command -v ceph-volume"
failed_when: false
register: ceph_volume_present