Skip to content

Commit a9e059e

Browse files
committed
update README describing new running order on 'vagrant up'
as discussed on #73.
1 parent 8948648 commit a9e059e

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

README.md

+26-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@ resolution of multi-machine environments deployed with a cloud provider
66
where IP addresses are not known in advance.
77

88
*NOTE:* Version 1.1 of the plugin prematurely introduced a feature to hook into
9-
commands other than `vagrant up` and `vagrant destroy`. Version 1.1 broke support for some providers. Version 1.2 reverts this feature until a suitable implementation supporting all providers is available.
9+
commands other than `vagrant up` and `vagrant destroy`. Version 1.1 broke support
10+
for some providers. Version 1.2 reverts this feature until a suitable implementation
11+
supporting all providers is available.
12+
13+
***Potentially breaking change in v1.5.0:*** the running order on `vagrant up` has changed
14+
so that hostmanager runs before provisioning takes place. This ensures all hostnames are
15+
available to the guest when it is being provisioned
16+
(see [#73](https://github.com/smdahlen/vagrant-hostmanager/issues/73)).
17+
Previously, hostmanager would run as the very last action. If you depend on the old behavior,
18+
see the [provisioner](#provisioner) section.
1019

1120
Installation
1221
------------
@@ -61,15 +70,26 @@ Vagrant.configure("2") do |config|
6170
end
6271
```
6372

64-
As a last option, you can use hostmanager as a provisioner.
65-
This allows you to use the provisioning order to ensure that hostmanager
66-
runs before or after provisioning. The provisioner will collect hosts from
67-
boxes with the same provider as the running box.
73+
### Provisioner
74+
75+
Starting at version 1.5.0, hostmanager runs before any provisioning occurs. If you
76+
would like hostmanager to run after or during your provisioning stage,
77+
you can use hostmanager as a provisioner. This allows you to use the provisioning
78+
order to ensure that hostmanager runs when desired. The provisioner will collect
79+
hosts from boxes with the same provider as the running box.
6880

69-
Use:
81+
Example:
7082

7183
```ruby
84+
# Disable the default hostmanager behavior
85+
config.hostmanager.enabled = false
86+
87+
# ... possible provisioner config before hostmanager ...
88+
89+
# hostmanager provisioner
7290
config.vm.provision :hostmanager
91+
92+
# ... possible provisioning config after hostmanager ...
7393
```
7494

7595
Custom IP resolver

0 commit comments

Comments
 (0)