provision.sh 528 Bytes
Newer Older
1 2
#!/bin/bash

3
# Divert
Andreas Schmidt's avatar
Andreas Schmidt committed
4 5
dpkg-divert --local --rename --add /sbin/initctl
ln -sf /bin/true sbin/initctl
Andreas Schmidt's avatar
Andreas Schmidt committed
6

7
# Packages
Andreas Schmidt's avatar
Andreas Schmidt committed
8
wget -O - https://repo.saltstack.com/apt/debian/9/amd64/latest/SALTSTACK-GPG-KEY.pub | sudo apt-key add -
9 10
echo "deb http://repo.saltstack.com/apt/debian/8/armhf/latest jessie main" > /etc/apt/sources.list.d/saltstack.list
apt-get update
Andreas Schmidt's avatar
Andreas Schmidt committed
11
apt-get install -y salt-minion
12 13

# Salt Provision
14
salt-call -l warning --local state.highstate
Andreas Schmidt's avatar
Andreas Schmidt committed
15

16
# Undo Divert
Andreas Schmidt's avatar
Andreas Schmidt committed
17 18
dpkg-divert --local --rename --remove /sbin/initctl
rm /sbin/initctl