Fix salt install on debian boxes

This commit is contained in:
Sylvain Fankhauser 2013-10-12 13:21:08 +02:00
parent 23e25c40ab
commit 0cb430a4ca
2 changed files with 29 additions and 1 deletions

View file

@ -124,7 +124,7 @@ if [ $PUPPET = 1 ]; then
fi fi
if [ $SALT = 1 ]; then if [ $SALT = 1 ]; then
./common/install-salt $ROOTFS ./common/install-salt-debian $ROOTFS
fi fi
if [ $BABUSHKA = 1 ]; then if [ $BABUSHKA = 1 ]; then

View file

@ -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/*