2014-06-04 23:39:58 +00:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
|
|
|
|
Vagrant.configure("2") do |config|
|
2014-06-06 12:20:26 +00:00
|
|
|
config.vm.box = "ubuntu14.04"
|
|
|
|
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
|
2014-06-04 23:39:58 +00:00
|
|
|
|
2017-01-15 15:47:36 +00:00
|
|
|
if Vagrant.has_plugin?("vagrant-cachier")
|
|
|
|
# Configure cached packages to be shared between instances of the same base box.
|
|
|
|
# More info on http://fgrehm.viewdocs.io/vagrant-cachier/usage
|
|
|
|
config.cache.scope = :box
|
|
|
|
end
|
|
|
|
|
2014-06-06 12:20:26 +00:00
|
|
|
# Network config: Since it's a mail server, the machine must be connected
|
|
|
|
# to the public web. However, we currently don't want to expose SSH since
|
|
|
|
# the machine's box will let anyone log into it. So instead we'll put the
|
|
|
|
# machine on a private network.
|
2016-12-20 21:32:06 +00:00
|
|
|
config.vm.hostname = "mailinabox.lan"
|
2014-06-06 12:20:26 +00:00
|
|
|
config.vm.network "private_network", ip: "192.168.50.4"
|
2014-06-04 23:39:58 +00:00
|
|
|
|
|
|
|
config.vm.provision :shell, :inline => <<-SH
|
|
|
|
# Set environment variables so that the setup script does
|
|
|
|
# not ask any questions during provisioning. We'll let the
|
2016-11-30 17:55:18 +00:00
|
|
|
# machine figure out its own public IP.
|
2014-08-25 11:54:11 +00:00
|
|
|
export NONINTERACTIVE=1
|
2014-06-07 18:55:57 +00:00
|
|
|
export PUBLIC_IP=auto
|
2014-06-08 22:32:52 +00:00
|
|
|
export PUBLIC_IPV6=auto
|
2016-11-30 17:55:18 +00:00
|
|
|
export PRIMARY_HOSTNAME=auto
|
2017-12-23 23:01:41 +00:00
|
|
|
export SKIP_NETWORK_CHECKS=1
|
2014-06-04 23:39:58 +00:00
|
|
|
|
|
|
|
# Start the setup script.
|
|
|
|
cd /vagrant
|
|
|
|
setup/start.sh
|
|
|
|
SH
|
|
|
|
end
|