5 changed files with 55 additions and 0 deletions
@ -0,0 +1,2 @@ |
|||||
|
## this is a config file for SAB |
||||
|
## seems the standard configs |
@ -0,0 +1,9 @@ |
|||||
|
# New by Dave |
||||
|
# HEADER: =========================================================== |
||||
|
# HEADER: This file is automanaged by puppet |
||||
|
# HEADER: While it can still be managed manually, it is definitely not recommended. |
||||
|
# HEADER: Any manual changes to this file run the risk of being overwritten! |
||||
|
# HEADER: =========================================================== |
||||
|
|
||||
|
alias lspuppet='tail -fn20 /var/log/puppetlabs/puppet-apply.log' |
||||
|
alias lsrepo='tail -fn20 /var/log/repofix/repofix.log' |
@ -0,0 +1,2 @@ |
|||||
|
# This just tests if a file appears in /usr/local/bin |
||||
|
# if so, we can use this repo to deploy files out to repos |
@ -0,0 +1,41 @@ |
|||||
|
#!/bin/bash |
||||
|
|
||||
|
# HEADER: =========================================================== |
||||
|
# HEADER: This file is automanaged by puppet |
||||
|
# HEADER: While it can still be managed manually, it is definitely not recommended. |
||||
|
# HEADER: Any manual changes to this file run the risk of being overwritten! |
||||
|
# HEADER: =========================================================== |
||||
|
|
||||
|
## "repofix" keeps the puppet manifests updated from gitea |
||||
|
## a quick check confirms alterationa to local files |
||||
|
## else.. those are updated with latest from gitea |
||||
|
|
||||
|
set -u |
||||
|
|
||||
|
## -- path to the Puppet manifest dirs |
||||
|
REPOBASE=/var/lib/puppet/manifests |
||||
|
|
||||
|
echo "$(date +'%F_%R:%S') ==== START ==== " |
||||
|
|
||||
|
## -- check each repo in turn |
||||
|
cd ${REPOBASE} |
||||
|
for REPO in $(ls -d *) |
||||
|
do |
||||
|
cd ${REPOBASE}/${REPO} |
||||
|
echo -e "$(date +'%F_%R:%S') checking ${REPO} ... \c" |
||||
|
STATUS="$(git status | tail -n1)" |
||||
|
if [[ ! ${STATUS} =~ "nothing to commit" ]] |
||||
|
then |
||||
|
echo "need to fix $REPO, showing diff on next line" |
||||
|
git diff |
||||
|
git fetch origin &> /dev/null |
||||
|
git reset --hard origin/master &> /dev/null |
||||
|
else |
||||
|
echo " ${STATUS}" |
||||
|
fi |
||||
|
git pull &> /dev/null |
||||
|
done |
||||
|
|
||||
|
echo "$(date +'%F_%R:%S') ------ END ------" |
||||
|
|
||||
|
|
@ -0,0 +1 @@ |
|||||
|
## something new here |
Loading…
Reference in new issue