Add update script; works like bootstrap script
Much copy and paste and should definitely be combined with the bootstrap script. Oh well...
This commit is contained in:
parent
800ef93772
commit
170e4e4391
1 changed files with 28 additions and 0 deletions
28
update.sh
Normal file
28
update.sh
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
# UPDATE SCRIPT - on a more clever day, I might merge this with bootstrap.sh
|
||||
# Can take a single param to allow a specific branch to be installed
|
||||
BRANCH=$1
|
||||
|
||||
# TO BE RUN AS ROOT
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
echo "This script must be run as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
# CLONE PUPPET REPOSITORY
|
||||
cd /tmp
|
||||
rm -rf puppet
|
||||
git clone https://github.com/atomaka/tc362.git puppet
|
||||
cd puppet
|
||||
|
||||
if [ "$BRANCH" != "" ]; then
|
||||
git fetch
|
||||
git checkout $BRANCH
|
||||
fi
|
||||
|
||||
# INSTALL MODULES
|
||||
librarian-puppet install
|
||||
|
||||
# RUN MANIFEST
|
||||
puppet apply manifests/site.pp --modulepath=modules/
|
Loading…
Reference in a new issue