summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 $@