Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing link in docs for the template parameter #92

Closed
aucampia opened this issue Jun 13, 2023 · 2 comments · Fixed by #111
Closed

Missing link in docs for the template parameter #92

aucampia opened this issue Jun 13, 2023 · 2 comments · Fixed by #111

Comments

@aucampia
Copy link

aucampia commented Jun 13, 2023

It seems like "here" on like 48 below should be a hyperlink, but it is not:

- `template` (string) - a path to a golang template for a vagrantfile. Our default template can
be found here. The template variables available to you are
`{{ .BoxName }}`, `{{ .SyncedFolder }}`, and `{{.InsertKey}}`, which
correspond to the Packer options box_name, synced_folder, and insert_key.

I would help fix it, but it is not clear what it should point to.

It should possibly be this:

var vboxVagrantfile = `
Vagrant.configure("2") do |config|
config.vm.base_mac = "%s"
end

@aucampia
Copy link
Author

Actually after further investigation, I think the default template is:

var DEFAULT_TEMPLATE = `Vagrant.configure("2") do |config|
config.vm.define "source", autostart: false do |source|
source.vm.box = "{{.SourceBox}}"
config.ssh.insert_key = {{.InsertKey}}
end
config.vm.define "output" do |output|
output.vm.box = "{{.BoxName}}"
output.vm.box_url = "file://package.box"
config.ssh.insert_key = {{.InsertKey}}
end
{{ if ne .SyncedFolder "" -}}
config.vm.synced_folder "{{.SyncedFolder}}", "/vagrant"
{{- else -}}
config.vm.synced_folder ".", "/vagrant", disabled: true
{{- end}}
end`

@VishnuJin
Copy link
Contributor

VishnuJin commented Feb 3, 2024

may be a duplicate of #20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants