#!/bin/bash
set -e

service nomad stop

for MOUNTPOINT in $(mount |grep {{ nomad_data_path }}  | awk '{print $3}')
do
 umount $MOUNTPOINT
done

rm -fR {{ nomad_data_path }}/* {{ nomad_log_path }}/* {{ nomad_config_path }}/*
