diff options
author | varac <varacanero@zeromail.org> | 2012-09-07 12:58:48 +0200 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2012-09-07 12:58:48 +0200 |
commit | ed2a625dd431233ca8813daab144b949b72c0402 (patch) | |
tree | 7f4191385500ff57c80e2bbe623ebb76a0d81e8c | |
parent | 852e036263a2473acc4c07e859aca1a2c7860b6e (diff) |
working on deploy.sh
-rwxr-xr-x | deploy.sh | 36 |
1 files changed, 24 insertions, 12 deletions
@@ -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 $@ |