Skip to content

Commit 3e60890

Browse files
committed
Switched to "official" debian/jessie64 box.
1 parent 6027cd7 commit 3e60890

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ Steven Cummings
22
Julia Elman
33
Matthew Irish
44
Mark Ransom
5+
Jon Smajda
56
Jeff Triplett
67
Chip Warden

Vagrantfile

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,26 @@
33

44
VAGRANTFILE_API_VERSION = "2"
55

6+
# Allow host platform checks
7+
# http://stackoverflow.com/questions/26811089/vagrant-how-to-have-host-platform-specific-provisioning-steps
8+
module OS
9+
def OS.windows?
10+
(/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
11+
end
12+
13+
def OS.mac?
14+
(/darwin/ =~ RUBY_PLATFORM) != nil
15+
end
16+
17+
def OS.unix?
18+
!OS.windows?
19+
end
20+
21+
def OS.linux?
22+
OS.unix? and not OS.mac?
23+
end
24+
end
25+
626
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
727

828
# vagrant-hostmanager plugin is required
@@ -15,13 +35,22 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
1535
raise 'vagrant-hostsupdater is not installed. run: vagrant plugin install vagrant-hostsupdater'
1636
end
1737

38+
# vagrant-vbguest plugin is required
39+
unless Vagrant.has_plugin?("vagrant-vbguest")
40+
raise'vagrant-vbguest is not installed. run: vagrant plugin install vagrant-vbguest'
41+
end
42+
1843
config.vm.define "pykcdotdev" do |pykcdotdev|
1944
pykcdotdev.vm.box = "debian/jessie64"
2045
pykcdotdev.vm.hostname = "pythonkc.dev"
2146
pykcdotdev.vm.network "private_network", ip: "192.168.100.101"
22-
pykcdotdev.vm.synced_folder "./", "/vagrant/"
23-
pykcdotdev.vm.synced_folder "./pythonkc_site", "/var/www/pythonkc_site"
24-
# TODO: Create a synced folder location for Ansible playbooks
47+
if OS.unix?
48+
pykcdotdev.vm.synced_folder "./", "/vagrant/", type: "nfs"
49+
elsif OS.windows?
50+
pykcdotdev.vm.synced_folder "./", "/vagrant/" # , type: "smb"
51+
else
52+
raise 'Unknown host operating system. Cannot continue.'
53+
end
2554

2655
pykcdotdev.vm.provider "virtualbox" do |vb|
2756
vb.name = "pykcdotdev"

provision.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ aptitude dist-upgrade -y
88
aptitude install build-essential -y
99
aptitude install linux-headers-amd64 -y
1010
ln -sf /vagrant /home/vagrant/
11+
mkdir -p /var/www
12+
ln -sf /vagrant/pythonkc_site /var/www/pythonkc_site
1113

1214
if [[ -z "$(which ansible)" ]]; then
1315
echo "Installing Ansible..."

0 commit comments

Comments
 (0)