Skip to content
This repository has been archived by the owner on Nov 24, 2020. It is now read-only.

Commit

Permalink
Enforce rule with basePort/last digits of IP
Browse files Browse the repository at this point in the history
  • Loading branch information
ngiger committed Jun 18, 2013
1 parent 424d300 commit 0c6dee8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Vagrantfile
Expand Up @@ -61,6 +61,11 @@ Vagrant.configure("2") do |config|

privateIp = hieraCfg['::oddb_org::ip']
privateIp ||= "192.168.50.#{portBase/1000}"
unless /\.#{portBase/1000}$/i.match(privateIp)
puts "portBase #{portBase/1000} should be last digits of ::oddb_org::ip in config.yaml but is #{privateIp}"

exit
end
oddbFuntoo.vm.network :private_network, ip: privateIp
oddbFuntoo.vm.network :forwarded_port, guest: 22, host: portBase + 22 # ssh
oddbFuntoo.vm.network :forwarded_port, guest: 80, host: portBase + 80 # apache
Expand Down

0 comments on commit 0c6dee8

Please sign in to comment.