From 0cb430a4cae0710dd049aa70a56e8b90ed5efb20 Mon Sep 17 00:00:00 2001 From: Sylvain Fankhauser Date: Sat, 12 Oct 2013 13:21:08 +0200 Subject: [PATCH] Fix salt install on debian boxes --- boxes/build-debian-box.sh | 2 +- boxes/common/install-salt-debian | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100755 boxes/common/install-salt-debian diff --git a/boxes/build-debian-box.sh b/boxes/build-debian-box.sh index 597ddd3..4b467bb 100755 --- a/boxes/build-debian-box.sh +++ b/boxes/build-debian-box.sh @@ -124,7 +124,7 @@ if [ $PUPPET = 1 ]; then fi if [ $SALT = 1 ]; then - ./common/install-salt $ROOTFS + ./common/install-salt-debian $ROOTFS fi if [ $BABUSHKA = 1 ]; then diff --git a/boxes/common/install-salt-debian b/boxes/common/install-salt-debian new file mode 100755 index 0000000..20209da --- /dev/null +++ b/boxes/common/install-salt-debian @@ -0,0 +1,28 @@ +#!/bin/bash + +set -e + +rootfs=$1 + +echo "installing salt" + +if [ $SUITE == "squeeze" ]; then + SALT_SOURCE="deb http://debian.saltstack.com/debian squeeze-saltstack main\ndeb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free" +elif [ $SUITE == "sid" ]; then + SALT_SOURCE="deb http://debian.saltstack.com/debian unstable main" +else + SALT_SOURCE="deb http://debian.saltstack.com/debian wheezy-saltstack main" +fi + +cat > $rootfs/tmp/install-salt << EOF +#!/bin/sh +echo "$SALT_SOURCE" > /etc/apt/sources.list.d/saltstack.list +wget -q -O- "http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key" | apt-key add - +apt-get update +apt-get install -y salt-minion +apt-get clean +EOF + +chroot $rootfs sh /tmp/install-salt + +rm -rf $rootfs/tmp/*