Created
February 11, 2015 14:33
-
-
Save damko/ddfe1dc9017031a1405e to your computer and use it in GitHub Desktop.
Prevent accidental halt of vagrant production vms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In Vagrantfile add the IF block right after the config.vm.define for the production vm | |
config.vm.define DO_VM_NAME do |production| | |
if ARGV[0] == 'halt' | |
puts "You can not halt the production vm" | |
ARGV.clear | |
exit | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment