People who use `osd_auto_discovery` feature will not have a devices
variable populated, so we first check for the existence of devices.
Signed-off-by: Sébastien Han <seb@redhat.com>
reworked the stop sequence by using ids instead of calling the 'all'
function which does not seem to be working all the time.
Signed-off-by: Sébastien Han <seb@redhat.com>
We don't necessary want to wipe and delete partition of the disks on the
monitor nodes, so we simply perform the operation on the OSD nodes.
Signed-off-by: Sébastien Han <seb@redhat.com>
We run a zap twice here since we can't combine with_items and
with_sequence yet. This will land in Ansible 2.0. We destroy all the
partitions and re-create new labels as well. We do this twice just
because sometimes one is not sufficient. We also call partprobe to make
sure that the kernel sees the changes.
Signed-off-by: leseb <seb@redhat.com>