Vagrant updates
* use a public box (the official Ubuntu 14.04 box which contra the description does have VBox Guest Additions installed) * now that we allow SSH password logins, since Vagrant requires it, dont muck with sshd_config here * don't put the machine on the public network because that will allow anyone to log into it with Vagrant's default username/password, duh
This commit is contained in:
parent
f9c3f33e74
commit
389c354c8f
1 changed files with 7 additions and 11 deletions
18
Vagrantfile
vendored
18
Vagrantfile
vendored
|
@ -2,21 +2,17 @@
|
||||||
# vi: set ft=ruby :
|
# vi: set ft=ruby :
|
||||||
|
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
config.vm.box = "ubuntu14.04-gitmachine"
|
config.vm.box = "ubuntu14.04"
|
||||||
config.vm.box_url = "ubuntu14.04-gitmachine.box"
|
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
|
||||||
|
|
||||||
# Network config: Since it's a mail server, it only makes sense
|
# Network config: Since it's a mail server, the machine must be connected
|
||||||
# to put it on the public network. This will let the machine
|
# to the public web. However, we currently don't want to expose SSH since
|
||||||
# take an IP address from your DHCP server. It's up to you to
|
# the machine's box will let anyone log into it. So instead we'll put the
|
||||||
# make sure its ports are exposed on the public web.
|
# machine on a private network.
|
||||||
config.vm.hostname = "mailinabox"
|
config.vm.hostname = "mailinabox"
|
||||||
config.vm.network "public_network"
|
config.vm.network "private_network", ip: "192.168.50.4"
|
||||||
|
|
||||||
config.vm.provision :shell, :inline => <<-SH
|
config.vm.provision :shell, :inline => <<-SH
|
||||||
# Our install will fail if SSH is installed and allows password-based authentication.
|
|
||||||
# `vagrant ssh` will still work if we disable password authentication.
|
|
||||||
echo "PasswordAuthentication no" >> /etc/ssh/sshd_config
|
|
||||||
|
|
||||||
# Set environment variables so that the setup script does
|
# Set environment variables so that the setup script does
|
||||||
# not ask any questions during provisioning. We'll let the
|
# not ask any questions during provisioning. We'll let the
|
||||||
# machine figure out its own public IP and it'll take a
|
# machine figure out its own public IP and it'll take a
|
||||||
|
|
Loading…
Reference in a new issue