diff options
author | Jesse Luehrs <doy@tozt.net> | 2018-10-19 22:58:34 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2018-10-19 22:58:34 -0400 |
commit | e4416660bccbf109cd35965510bc8153bd172be9 (patch) | |
tree | a3f1a0414f33a30288154a73cea62fcb54899502 /bin/helpers | |
parent | 0fcb7aea6c32777276fe66e721ca1d5dddd2d48f (diff) | |
download | puppet-tozt-e4416660bccbf109cd35965510bc8153bd172be9.tar.gz puppet-tozt-e4416660bccbf109cd35965510bc8153bd172be9.zip |
make tools recognize the mail host type
Diffstat (limited to 'bin/helpers')
-rwxr-xr-x | bin/helpers/launch-mail | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/bin/helpers/launch-mail b/bin/helpers/launch-mail new file mode 100755 index 0000000..91ba123 --- /dev/null +++ b/bin/helpers/launch-mail @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +set -eu +set -o pipefail + +echo "Creating droplet for mail..." +id=$(doctl \ + -t "$(cat /mnt/digitalocean)" \ + compute droplet create \ + mail \ + --image debian-9-x64 \ + --region nyc3 \ + --size s-1vcpu-1gb \ + --ssh-keys 23160354 \ + --format ID \ + --no-header \ + --wait) +echo "Created droplet with id $id" + +echo "Assigning floating ip to mail..." +# XXX this returns an error for some reason, but actually succeeds: +# Error: could not assign IP to droplet: json: cannot unmarshal number +# 2328181259 into Go struct field Action.resource_id of type int +doctl \ + -t "$(cat /mnt/digitalocean)" \ + compute floating-ip-action assign \ + 159.89.254.14 \ + "$id" || true +echo "Done assigning floating ip" + +echo "Provisioning droplet..." + +# ... + +echo "Done" |