477db9c37c
Instead of stopping at the first error, keep going and report all of the errors. Change-Id: I940f3a263164c8d1b13b525fb825d9f3eaf316a0
20 lines
554 B
Bash
Executable File
20 lines
554 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
ROOT=$(readlink -fn $(dirname $0))
|
|
MODULE_PATH="${ROOT}/modules:/etc/puppet/modules"
|
|
|
|
if [ ! -d applytest ] ; then
|
|
mkdir applytest
|
|
fi
|
|
|
|
csplit -sf applytest/puppetapplytest manifests/site.pp '/^$/' {*}
|
|
sed -i -e 's/^[^[:space:]]/#&/g' applytest/puppetapplytest*
|
|
sed -i -e 's@hiera(.\([^.]*\).,\([^)]*\))@\2@' applytest/puppetapplytest*
|
|
|
|
set +e
|
|
RETURN=0
|
|
for f in `find applytest -name 'puppetapplytest*' -print` ; do
|
|
sudo puppet apply --modulepath=${MODULE_PATH} --noop --verbose --debug $f >/dev/null || RETURN=1
|
|
done
|
|
exit $RETURN
|