Skip to content

Commit

Permalink
Switch to vagrant-hostmanager, closes #422
Browse files Browse the repository at this point in the history
  • Loading branch information
David Blencowe committed Dec 24, 2015
1 parent 7211684 commit d9833dc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### HEAD
* Replace `vagrant-hostsupdater` with `vagrant-hostmanager` ([#442](https://github.com/roots/trellis/pull/442))
* Switch to mainline Nginx, replaces SPDY with HTTP2 ([#389](https://github.com/roots/trellis/issues/389))
* Add `wp core update-db` to deploy finalize hook ([#411](https://github.com/roots/trellis/pull/411))
* Use WP-CLI 0.21.1 ([#392](https://github.com/roots/trellis/pull/392))
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Trellis documentation is available at [https://roots.io/trellis/docs/](https://r
* Virtualbox >= 4.3.10 - [Install](https://www.virtualbox.org/wiki/Downloads)
* Vagrant >= 1.5.4 - [Install](http://www.vagrantup.com/downloads.html)[Docs](https://docs.vagrantup.com/v2/)
* vagrant-bindfs >= 0.3.1 - [Install](https://github.com/gael-ian/vagrant-bindfs#installation)[Docs](https://github.com/gael-ian/vagrant-bindfs) (Windows users may skip this)
* vagrant-hostsupdater - [Install](https://github.com/cogitatio/vagrant-hostsupdater#installation)[Docs](https://github.com/cogitatio/vagrant-hostsupdater)
* vagrant-hostmanager - [Install](https://github.com/smdahlen/vagrant-hostmanager#installation)[Docs](https://github.com/smdahlen/vagrant-hostmanager)

## Installation

Expand Down
8 changes: 5 additions & 3 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ Vagrant.configure('2') do |config|
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
if Vagrant.has_plugin? 'vagrant-hostmanager'
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.aliases = aliases + www_aliases
else
fail_with_message "vagrant-hostsupdater missing, please install the plugin with this command:\nvagrant plugin install vagrant-hostsupdater"
fail_with_message "vagrant-hostmanager missing, please install the plugin with this command:\nvagrant plugin install vagrant-hostmanager"
end

if Vagrant::Util::Platform.windows?
Expand Down

0 comments on commit d9833dc

Please sign in to comment.