This repository has been archived by the owner on Nov 16, 2019. It is now read-only.
forked from City-of-Helsinki/openahjo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
49 lines (40 loc) · 1.79 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Base box to build off, and download URL for when it doesn't exist
# on the user's system already
ubuntu_release = "raring"
ip_address = "192.168.79.2"
config.vm.box = "#{ubuntu_release}-server64"
config.vm.box_url =
"http://cloud-images.ubuntu.com/vagrant/#{ubuntu_release}/current/#{ubuntu_release}-server-cloudimg-amd64-vagrant-disk1.box"
config.vm.hostname = "openahjodev.localdomain"
# Assign this VM to a host only network IP, allowing you to access
# it
# via the IP.
config.vm.network "private_network", ip: ip_address
#config.ssh.host = ip_address
#config.ssh.port = 22
# Forward a port from the guest to the host, which allows for
# outside
# computers to access the VM, whereas host only networking does not.
config.vm.network "forwarded_port", guest: 8000, host: 8079
config.vm.network "forwarded_port", guest: 22, host: 2279, id: "ssh", auto_correct: true
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--cpus", "2"]
v.customize ["modifyvm", :id, "--ostype", "Ubuntu_64"]
v.memory = 1024
end
$script = <<SCRIPT
cat /etc/ssh/sshd_config | grep -v -e "^AcceptEnv" > /etc/ssh/sshd_config.new
mv /etc/ssh/sshd_config.new /etc/ssh/sshd_config
service ssh reload
SCRIPT
config.vm.provision "shell", inline: $script
config.vm.provision "ansible" do |ansible|
ansible.playbook = "deployment/site.yml"
ansible.extra_vars = { app_user: "vagrant" }
ansible.host_key_checking = false
#ansible.verbose = "v"
end
end