Update README.md

This commit is contained in:
Seth Reeser 2016-09-14 15:41:16 -04:00 committed by GitHub
parent d8a03b98f3
commit eb82fef54f
1 changed files with 11 additions and 11 deletions

View File

@ -16,7 +16,7 @@ Install the plugin following the typical Vagrant 1.1 procedure:
Usage Usage
----- -----
To update the `/etc/hosts` file on each active machine, run the following To update the `hosts` file on each active machine, run the following
command: command:
$ vagrant hostmanager $ vagrant hostmanager
@ -24,14 +24,14 @@ command:
The plugin hooks into the `vagrant up` and `vagrant destroy` commands The plugin hooks into the `vagrant up` and `vagrant destroy` commands
automatically. automatically.
When a machine enters or exits the running state , all active When a machine enters or exits the running state , all active
machines with the same provider will have their `/etc/hosts` file updated machines with the same provider will have their `hosts` file updated
accordingly. Set the `hostmanager.enabled` attribute to `true` in the accordingly. Set the `hostmanager.enabled` attribute to `true` in the
Vagrantfile to activate this behavior. Vagrantfile to activate this behavior.
To update the host's `/etc/hosts` file, set the `hostmanager.manage_host` To update the host's `hosts` file, set the `hostmanager.manage_host`
attribute to `true`. attribute to `true`.
To update the guests' `/etc/hosts` file, set the `hostmanager.manage_guest` To update the guests' `hosts` file, set the `hostmanager.manage_guest`
attribute to `true`. attribute to `true`.
A machine's IP address is defined by either the static IP for a private A machine's IP address is defined by either the static IP for a private
@ -90,14 +90,14 @@ config.vm.provision :hostmanager
Custom IP resolver Custom IP resolver
------------------ ------------------
You can customize way, how host manager resolves IP address You can customize how vagrant-hostmanager resolves IP address
for each machine. This might be handy in case of aws provider, for each machine. This might be handy in the case of the AWS provider,
where host name is stored in ssh_info hash of each machine. where the host name is stored in the ssh_info hash of each machine.
This causes generation of invalid /etc/hosts file. This causes a generation of an invalid `hosts` file.
Custom IP resolver gives you oportunity to calculate IP address A custom IP resolver gives you the oportunity to calculate IP address
for each machine by yourself, giving You also access to the machine that is for each machine by yourself, giving you access to the machine that is
updating /etc/hosts. For example: updating `hosts`. For example:
```ruby ```ruby
config.hostmanager.ip_resolver = proc do |vm, resolving_vm| config.hostmanager.ip_resolver = proc do |vm, resolving_vm|