Merge pull request #7417 from estenrye/update_documentation_7414

Update incorrect documentation on vagrant builder.
This commit is contained in:
Adrien Delorme 2019-03-18 18:27:26 +01:00 committed by GitHub
commit 95055417bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 2 deletions

View File

@ -74,11 +74,21 @@ one, by using `global_id` instead of `source_box`.
not recommended since OVA files can be very large and corruption does happen not recommended since OVA files can be very large and corruption does happen
from time to time. from time to time.
- `vagrantfile_template` (string) - a path to a golang template for a - `template` (string) - a path to a golang template for a
vagrantfile. Our default template can be found vagrantfile. Our default template can be found
[here](https://github.com/hashicorp/packer/blob/a6d1d852bb0643e3593cc5d3dfe5ed80c4409b65/builder/vagrant/step_create_vagrantfile.go#L23-L30). So far the only template variables available to you are {{ .BoxName }} and [here](https://github.com/hashicorp/packer/blob/a6d1d852bb0643e3593cc5d3dfe5ed80c4409b65/builder/vagrant/step_create_vagrantfile.go#L23-L30). So far the only template variables available to you are {{ .BoxName }} and
{{ .SyncedFolder }}, which correspond to the Packer options `box_name` and {{ .SyncedFolder }}, which correspond to the Packer options `box_name` and
`synced_folder` `synced_folder`.
You must provide a template if your default vagrant provider is Hyper-V.
Below is a Hyper-V compatible template.
```ruby
Vagrant.configure("2") do |config|
config.vm.box = "{{ .BoxName }}"
config.vm.network 'public_network', bridge: 'Default Switch'
end
```
- `skip_add` (bool) - Don't call "vagrant add" to add the box to your local - `skip_add` (bool) - Don't call "vagrant add" to add the box to your local
environment; this is necessary if you want to launch a box that is already environment; this is necessary if you want to launch a box that is already