Created
July 30, 2017 21:52
-
-
Save lucasprogamer/200f5245911453bee7d9e1c3c1db9565 to your computer and use it in GitHub Desktop.
Setting vagrant-hostmanager
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
if Vagrant.has_plugin? 'vagrant-hostmanager' | |
config.hostmanager.enabled = true | |
config.hostmanager.manage_host = true | |
config.hostmanager.manage_guest = true | |
config.vm.provision :hostmanager | |
settings = YAML::load(File.read(homesteadYamlPath)) | |
config.hostmanager.aliases = settings['sites'].map { |item| item['map'] } | |
puts "hostmanager aliases: " + config.hostmanager.aliases.join(' ') | |
else | |
fail_with_message "vagrant-hostmanager missing, please install the plugin with this command:\nvagrant plugin install vagrant-hostmanager" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment