94a7768dc3
Pass the sysadmins list into each node definition. This allows us to retrieve the data from hiera rather than hard coding it in the puppet manifests. Also, update test script to use bogus sysadmin data when testing. Change-Id: Ide3560f16bce4d66fb95cc5021fc879476e6a712 Reviewed-on: https://review.openstack.org/12512 Reviewed-by: James E. Blair <corvus@inaugust.com> Approved: Monty Taylor <mordred@inaugust.com> Reviewed-by: Monty Taylor <mordred@inaugust.com> Tested-by: Jenkins
18 lines
727 B
Bash
Executable File
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
|