summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdeploy.sh36
1 files changed, 24 insertions, 12 deletions
diff --git a/deploy.sh b/deploy.sh
index fd109c13..e6a6c7ea 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -1,25 +1,37 @@
-#!/bin/sh
+#!/bin/sh -x
#
# missing: header, licence, usage
-apt-get install lsb-release git
+install_packages ()
+{
+ apt-get install lsb-release git
-# we need puppet from backports
-dist="`lsb_release -cs`"
+ # we need puppet from backports
+ dist="`lsb_release -cs`"
-# enable backports for puppet + facter
-[ -f /etc/apt/sources.list.d/$dist-backports.list ] || echo "deb http://backports.debian.org/debian-backports/ $dist-backports main contrib non-free">/etc/apt/sources.list.d/$dist-backports.list
+ # enable backports for puppet + facter
+ [ -f /etc/apt/sources.list.d/$dist-backports.list ] || echo "deb http://backports.debian.org/debian-backports/ $dist-backports main contrib non-free">/etc/apt/sources.list.d/$dist-backports.list
-# enable debian testing for ruby-hiera-puppet
-cat > /etc/apt/preferences.d/wheezy <<DELIM
+ # enable debian wheezy for ruby-hiera-puppet
+ if [ "$dist" != "wheezy" ]
+ then
+ cat > /etc/apt/preferences.d/wheezy <<DELIM
Package: *
Pin: release o=Debian,n=wheezy
Pin-Priority: 2
DELIM
+ fi
-apt-get update
-apt-get install -y -t $dist-backports facter puppet
-apt-get install ruby-hiera-puppet ruby-hiera
+ apt-get update
+ apt-get install -y -t $dist-backports facter puppet
+ apt-get install ruby-hiera-puppet ruby-hiera
+}
+
+# main
+
+# commented for testing purposes
+#install_packages
+
+puppet apply --confdir=$PWD/puppet $PWD/puppet/manifests/site.pp $@
-puppet apply --modulepath=$PWD/puppet/modules $PWD/puppet/manifests/site.pp $@