summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2012-09-24 18:32:22 +0200
committervarac <varacanero@zeromail.org>2012-09-24 18:32:22 +0200
commit914eddd89cbd33383c5b84bfdd063e670b848c09 (patch)
tree47d928a1f84ea70fcda2c5949d5505db8d6e8812
parent48bedbcc44bc8a340c7ca6aae5fb1bba1d89e4c1 (diff)
cleaned deploy.sh
-rwxr-xr-xdeploy.sh32
1 files changed, 8 insertions, 24 deletions
diff --git a/deploy.sh b/deploy.sh
index e6a6c7ea..6aab1119 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -2,36 +2,20 @@
#
# missing: header, licence, usage
+PUPPET_ENV='--confdir=puppet'
-install_packages ()
-{
- apt-get install lsb-release git
-
- # 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 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
-
+install_prerequisites () {
apt-get update
- apt-get install -y -t $dist-backports facter puppet
- apt-get install ruby-hiera-puppet ruby-hiera
+ apt-get install puppet
+
+ # lsb is needed for a first puppet run
+ puppet apply $PUPPET_ENV --execute 'include lsb'
}
# main
# commented for testing purposes
-#install_packages
+#install_prerequisites
-puppet apply --confdir=$PWD/puppet $PWD/puppet/manifests/site.pp $@
+puppet apply $PUPPET_ENV puppet/manifests/site.pp $@