system-config/test.sh
James E. Blair 56562d83f7 Revert "Adds second hiera data directory"
This did not seem to work.

This reverts commit ed57cef9c5
2014-03-31 21:06:37 +00:00

18 lines
727 B
Bash
Executable File

find . -iname '*.pp' | xargs puppet parser validate --modulepath=`pwd`/modules
for f in `find . -iname *.erb` ; do
erb -x -T '-' $f | ruby -c >/dev/null || echo "Error in $f"
done
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..sysadmins../["admin"]/' applytest/puppetapplytest*
sed -i -e 's/hiera..listadmins../["admin"]/' applytest/puppetapplytest*
sed -i -e 's/hiera.*/PASSWORD,/' applytest/puppetapplytest*
for f in `find applytest -name 'puppetapplytest*' -print` ; do
puppet apply --modulepath=./modules:/etc/puppet/modules -v --noop --debug $f >/dev/null
done