Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: a985f8413f
Fetching contributors…

Cannot retrieve contributors at this time

executable file 22 lines (15 sloc) 0.483 kb
#!/bin/sh
HOSTNAME=`hostname -s`
LOGFILE="puppet.`date "+%s"`.log"
ERROR_FILE="last_run_failed"
echo "==> Preparing to run ${HOSTNAME}.pp, Ctrl-C immediately to abort"
sleep 5
rm -f ${ERROR_FILE}
echo
echo "==> Generating log file: ${LOGFILE}"
git pull --rebase >> ${LOGFILE} 2>&1 && \
git submodule update --init >> ${LOGFILE} 2>&1 && \
puppet apply --modulepath=modules --verbose manifests/${HOSTNAME}.pp >> ${LOGFILE} 2>&1
if [ $? -ne 0 ]; then
touch ${ERROR_FILE}
fi
Jump to Line
Something went wrong with that request. Please try again.