Automatically set hostnames when launching vagrant boxes
Ruby
Pull request Compare This branch is 1 commit ahead, 8 commits behind dwt:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test
.gitignore
Gemfile
Gemfile.lock
Rakefile
Readme.md
vagrant-hosts.gemspec

Readme.md

vagrant-hosts

vagrant-hosts is a plugin for Vagrant which allows a developer to automatically add or remove local hosts entries when bringing up or shutting down machines with vagrant.

NOTE: This plugin requires Vagrant 0.8 or later.

Installing / Getting Started

To use this plugin, first install Vagrant 0.6 or later. Next, install this gem:

gem install vagrant-hosts

TODO explain how to configure it. Example:

Vagrant::Config.run do |config|
  config.hosts.names = ["host.name", "another.name"]
end

Caveats

  • Only supports single machine setups for now
  • Cannot yet do indirect hostname getting, i.e. you will have to configure the hostname twice, once in the machine and another time in the vagrant file.