diff options
author | EuAndreh <eu@euandre.org> | 2019-06-10 09:03:58 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2019-06-10 09:11:27 -0300 |
commit | 95fb2c190a2143ab84be1b18fdd2ec587e54d05e (patch) | |
tree | 52737ee757a87edc88227c3da8c378e134183689 /scripts/ci/provision.sh | |
parent | Change $TLD (diff) | |
download | server-95fb2c190a2143ab84be1b18fdd2ec587e54d05e.tar.gz server-95fb2c190a2143ab84be1b18fdd2ec587e54d05e.tar.xz |
Provision DNS entries using DigitalOcean instead of DNS registrar
This way we can implement dynamic (provision-time) Floating IP, instead of a
hardcoded pre-created Floating IP address.
Related changes:
- remove =terraform-godaddy= provider, use =digitalocean_record= instead;
- create =generated-known-hosts= after provisioning instead of during
=setup.sh=: use the =$(terraform output public_floating_ip)= value to make this
file dynamic;
- remote the =$PINNED_IP= and =$TF_VAR_floating_ip= variables;
- add type and descriptions to variable declarations in Terraform recipe.
Diffstat (limited to 'scripts/ci/provision.sh')
-rwxr-xr-x | scripts/ci/provision.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/ci/provision.sh b/scripts/ci/provision.sh index 3b2d912..b1d23e5 100755 --- a/scripts/ci/provision.sh +++ b/scripts/ci/provision.sh @@ -28,7 +28,6 @@ ssh "$TLD" /home/vps/create-backup.sh || echo "FAILED TO CREATE BACKUP." echo "Done." echo "Initializing Terraform..." -ln -s "$(command -v terraform-godaddy)" terraform-provider-godaddy terraform --version terraform init echo "Done." @@ -66,6 +65,8 @@ popd echo "Done." echo "Running the Ansible playbook..." + +echo "${TLD},$(terraform output public_floating_ip) ssh-rsa $(awk '{print $2}' < ./secrets/ssh/vps-box-server.pub)" > ./generated-known-hosts.txt ansible-playbook provision.yaml echo "Done." |