fuel-library/deployment/remove_modules.sh

14 lines
308 B
Bash
Executable File

#!/bin/sh
# remove all external puppet modules
dir=`dirname $0`
cd "${dir}" || exit 1
cat Puppetfile | grep "^mod '" | awk -F "'" '{ print $2 }' | while read module; do
if [ -d "puppet/${module}" ]; then
echo "Remove: puppet/${module}"
rm -rf "puppet/${module}"
fi
done
rm -f 'Puppetfile.lock'