4fc0a1ea0a
This commit rewrites the Vagrantfile for Packer in a similar manner to the work done for Nomad (hashicorp/nomad#3175) in order to make cross-platform development easier. It also adds support for a FreeBSD base box. Provisioning scripts are separated out in order that they can be correctly linted. Each script is prefixed `vagrant`, then the operating system, then whether or not it expects to be run in a privileged shell. Finally, dependencies have been bumped - Go 1.6 is switched out for the latest (1.9.2).
20 lines
460 B
Bash
Executable File
20 lines
460 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Update and ensure we have apt-add-repository
|
|
apt-get update
|
|
apt-get install -y software-properties-common
|
|
|
|
apt-get install -y bzr \
|
|
curl \
|
|
git \
|
|
make \
|
|
mercurial \
|
|
zip
|
|
|
|
# Ensure we cd into the working directory on login
|
|
if ! grep "cd /opt/gopath/src/github.com/hashicorp/packer" /home/vagrant/.profile ; then
|
|
echo 'cd /opt/gopath/src/github.com/hashicorp/packer' >> /home/vagrant/.profile
|
|
fi
|