don't let local modifications from blocking puppet apply.

If a local workspace is modified intentionally or unintentionally,
"git pull" will refuse to overwrite local changes with what's in
the repo, and puppet application will block forever.

It'd be much better to automatically correct this situation,
especially given that we have no ability to detect failures
to apply puppet configuration currently.

This has a risk of overwriting local changes anyone is making
on that box, but one is not supposed to do that anyway!
This commit is contained in:
Kohsuke Kawaguchi 2013-11-17 08:37:14 -08:00
parent b9be900ae4
commit 530ddb5f1b
1 changed files with 2 additions and 1 deletions

3
run.sh
View File

@ -40,7 +40,8 @@ sleep 5
rm -f ${ERROR_FILE}
git pull --rebase && \
git reset --hard HEAD && \
git pull && \
git submodule update --init && \
librarian-puppet install && \
puppet apply --modulepath=modules --verbose manifests/${HOSTNAME}.pp