#!/bin/bash

set -x -e

export AWS_SSH_PRIVATE_KEY_PATH=$PWD/deploy-vagrant-aws/vagrant.pem
export LATTICE_DIR=$PWD/deploy-vagrant-aws/lattice
cat <<< "$AWS_SSH_PRIVATE_KEY" > "$AWS_SSH_PRIVATE_KEY_PATH"

curl -LO https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.4_x86_64.deb
dpkg -i vagrant_1.7.4_x86_64.deb

while ! vagrant plugin install vagrant-aws; do
  sleep 5
done

vagrant box add lattice/ubuntu-trusty-64 --provider=aws

( cd $LATTICE_DIR && vagrant destroy -f )

#!/bin/bash

set -x -e

export AWS_SSH_PRIVATE_KEY_PATH=$PWD/deploy-vagrant-aws/vagrant.pem
export VAGRANT_TMP_DIR=$PWD/deploy-vagrant-aws/vagrant-tmp
cat <<< "$AWS_SSH_PRIVATE_KEY" > "$AWS_SSH_PRIVATE_KEY_PATH"

curl -LO https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.4_x86_64.deb
dpkg -i vagrant_1.7.4_x86_64.deb

while ! vagrant plugin install vagrant-aws; do
  sleep 5
done

vagrant box add lattice/ubuntu-trusty-64 --provider=aws

( cd $VAGRANT_TMP_DIR && vagrant destroy -f )

--- 
+++ 
@@ -3,7 +3,7 @@
 set -x -e
 
 export AWS_SSH_PRIVATE_KEY_PATH=$PWD/deploy-vagrant-aws/vagrant.pem
-export VAGRANT_TMP_DIR=$PWD/deploy-vagrant-aws/vagrant-tmp
+export LATTICE_DIR=$PWD/deploy-vagrant-aws/lattice
 cat <<< "$AWS_SSH_PRIVATE_KEY" > "$AWS_SSH_PRIVATE_KEY_PATH"
 
 curl -LO https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.4_x86_64.deb
@@ -15,4 +15,4 @@
 
 vagrant box add lattice/ubuntu-trusty-64 --provider=aws
 
-( cd $VAGRANT_TMP_DIR && vagrant destroy -f )
+( cd $LATTICE_DIR && vagrant destroy -f )
Fix cleanup-deploy-vagrant-aws task to match changes in associated deploy task

[#101716496]

Signed-off-by: Colin Jackson <4f4efc23f45cfd2ccaeb623d4ab84100edb791f6@pivotal.io>
