Use different sinatra server based on platform

This commit is contained in:
James Barnett 2017-09-01 16:23:59 -05:00
parent b1b50a6872
commit 6088d95c0b
3 changed files with 4 additions and 2 deletions

View File

@ -9,6 +9,8 @@
include_recipe 'metasploitable::sinatra'
include_recipe 'metasploitable::ruby23'
server_path = node['ec2'] ? 'aws' : 'virtualbox'
directory '/opt/sinatra' do
mode '0777'
end
@ -28,7 +30,7 @@ cookbook_file '/opt/sinatra/server' do
end
cookbook_file '/opt/sinatra/.server' do
source 'sinatra/server'
source "sinatra/#{server_path}/server"
mode '0777'
end

View File

@ -44,6 +44,6 @@
"iso_url": "http://old-releases.ubuntu.com/releases/14.04.1/ubuntu-14.04.1-server-amd64.iso",
"iso_checksum_type": "md5",
"iso_checksum": "ca2531b8cd79ea5b778ede3a524779b9",
"box_version": "0.1.2"
"box_version": "0.1.6"
}
}