summaryrefslogtreecommitdiffstats
path: root/bootstrap
blob: 96e6301e3cd1cfc4ff7f5ac7989321aa39b0028b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash
set -eux
set -o pipefail

host="$1"

if ssh root@$host test ! -e /usr/bin/pacman; then
    ssh root@$host wget https://raw.githubusercontent.com/gh2o/digitalocean-debian-to-arch/debian9/install.sh -O install.sh
    echo "wipe this droplet" | ssh root@host bash install.sh
    sleep 15
fi

ssh root@$host pacman --noconfirm --needed -S puppet git

if ssh root@$host test -d /root/bootstrap-tozt; then
    ssh root@$host "cd bootstrap-tozt && git pull"
else
    ssh root@$host git clone git://github.com/doy/bootstrap-tozt
fi

ssh root@$host "cd bootstrap-tozt && puppet apply --modulepath=./modules manifest.pp"