diff options
author | Jesse Luehrs <doy@tozt.net> | 2017-11-04 02:55:06 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2017-11-04 02:55:06 -0400 |
commit | 3c7671515ccfa9c30154e5b9ec2ac0f53e5a56fe (patch) | |
tree | 9ffc5ecca8aed6e19570dbd7d29afeee4d588946 /bootstrap | |
parent | 6ed2e36883d6f9d483704becc9031feaf6bee3de (diff) | |
download | puppet-tozt-3c7671515ccfa9c30154e5b9ec2ac0f53e5a56fe.tar.gz puppet-tozt-3c7671515ccfa9c30154e5b9ec2ac0f53e5a56fe.zip |
initial sketch
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/bootstrap b/bootstrap new file mode 100755 index 0000000..e2cdf1c --- /dev/null +++ b/bootstrap @@ -0,0 +1,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 -S puppet git + +if ssh root@$host test -d /root/bootstrap-tozt; then + ssh root@$host sh -c "cd bootstrap-tozt && git pull" +else + ssh root@$host git clone git://github.com/doy/bootstrap-tozt +fi + +ssh root@$host sh -c "cd bootstrap-tozt && puppet apply manifest.pp" |