Skip to content

Instantly share code, notes, and snippets.

@emaildano
Created January 29, 2016 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emaildano/f4112b5f40d5ca3452ba to your computer and use it in GitHub Desktop.
Save emaildano/f4112b5f40d5ca3452ba to your computer and use it in GitHub Desktop.
hostname, *aliases = wordpress_sites.flat_map { |(_name, site)| site['site_hosts'] }
config.vm.hostname = hostname
www_aliases = ["www.#{hostname}"] + aliases.map { |host| "www.#{host}" }
if Vagrant.has_plugin? 'vagrant-hostsupdater'
config.hostsupdater.aliases = aliases + www_aliases
else
fail_with_message "vagrant-hostsupdater missing, please install the plugin with this command:\nvagrant plugin install vagrant-hostsupdater"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment