summaryrefslogtreecommitdiff
path: root/deploy.sh
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2012-09-07 12:58:48 +0200
committervarac <varacanero@zeromail.org>2012-09-07 12:58:48 +0200
commited2a625dd431233ca8813daab144b949b72c0402 (patch)
tree7f4191385500ff57c80e2bbe623ebb76a0d81e8c /deploy.sh
parent852e036263a2473acc4c07e859aca1a2c7860b6e (diff)
working on deploy.sh
Diffstat (limited to 'deploy.sh')
-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 $@