From 8488176dae56cb99bad609f2cef378b46c6bd3e0 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Wed, 5 Jun 2019 16:46:33 +0200 Subject: [PATCH] vagrant/builder.Config rewrap docs --- builder/vagrant/builder.go | 63 ++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 33 deletions(-) diff --git a/builder/vagrant/builder.go b/builder/vagrant/builder.go index be07796f1..1da055155 100644 --- a/builder/vagrant/builder.go +++ b/builder/vagrant/builder.go @@ -38,38 +38,36 @@ type Config struct { common.FloppyConfig `mapstructure:",squash"` bootcommand.BootConfig `mapstructure:",squash"` SSHConfig `mapstructure:",squash"` - // The directory to create that will contain - // your output box. We always create this directory and run from inside of it to - // prevent Vagrant init collisions. If unset, it will be set to packer- plus - // your buildname. + // The directory to create that will contain your output box. We always + // create this directory and run from inside of it to prevent Vagrant init + // collisions. If unset, it will be set to packer- plus your buildname. OutputDir string `mapstructure:"output_dir" required:"false"` - // URL of the vagrant box to use, or the name of the - // vagrant box. hashicorp/precise64, ./mylocalbox.box and - // https://example.com/my-box.box are all valid source boxes. If your - // source is a .box file, whether locally or from a URL like the latter example - // above, you will also need to provide a box_name. This option is required, - // unless you set global_id. You may only set one or the other, not both. + // URL of the vagrant box to use, or the name of the vagrant box. + // hashicorp/precise64, ./mylocalbox.box and https://example.com/my-box.box + // are all valid source boxes. If your source is a .box file, whether + // locally or from a URL like the latter example above, you will also need + // to provide a box_name. This option is required, unless you set + // global_id. You may only set one or the other, not both. SourceBox string `mapstructure:"source_path" required:"true"` - // the global id of a Vagrant box already added to Vagrant - // on your system. You can find the global id of your Vagrant boxes using the - // command vagrant global-status; your global_id will be a 7-digit number and + // the global id of a Vagrant box already added to Vagrant on your system. + // You can find the global id of your Vagrant boxes using the command + // vagrant global-status; your global_id will be a 7-digit number and // letter comination that you'll find in the leftmost column of the // global-status output. If you choose to use global_id instead of // source_box, Packer will skip the Vagrant initialize and add steps, and // simply launch the box directly using the global id. GlobalID string `mapstructure:"global_id" required:"true"` - // The checksum for the .box file. The type of the - // checksum is specified with checksum_type, documented below. + // The checksum for the .box file. The type of the checksum is specified + // with checksum_type, documented below. Checksum string `mapstructure:"checksum" required:"false"` - // The type of the checksum specified in checksum. - // Valid values are none, md5, sha1, sha256, or sha512. Although the - // checksum will not be verified when checksum_type is set to "none", this is - // not recommended since OVA files can be very large and corruption does happen - // from time to time. + // The type of the checksum specified in checksum. Valid values are none, + // md5, sha1, sha256, or sha512. Although the checksum will not be verified + // when checksum_type is set to "none", this is not recommended since OVA + // files can be very large and corruption does happen from time to time. ChecksumType string `mapstructure:"checksum_type" required:"false"` - // if your source_box is a boxfile that we need to add - // to Vagrant, this is the name to give it. If left blank, will default to - // "packer_" plus your buildname. + // if your source_box is a boxfile that we need to add to Vagrant, this is + // the name to give it. If left blank, will default to "packer_" plus your + // buildname. BoxName string `mapstructure:"box_name" required:"false"` // The vagrant provider. // This parameter is required when source_path have more than one provider, @@ -82,22 +80,21 @@ type Config struct { // What vagrantfile to use VagrantfileTpl string `mapstructure:"vagrantfile_template"` - // Whether to halt, suspend, or destroy the box when - // the build has completed. Defaults to "halt" + // Whether to halt, suspend, or destroy the box when the build has + // completed. Defaults to "halt" TeardownMethod string `mapstructure:"teardown_method" required:"false"` // What box version to use when initializing Vagrant. BoxVersion string `mapstructure:"box_version" required:"false"` - // a path to a golang template for a - // vagrantfile. Our default template can be found - // here. So far the only template variables available to you are {{ .BoxName }} and - // {{ .SyncedFolder }}, which correspond to the Packer options box_name and - // synced_folder. + // a path to a golang template for a vagrantfile. Our default template can + // be found here. So far the only template variables available to you are + // {{ .BoxName }} and {{ .SyncedFolder }}, which correspond to the Packer + // options box_name and synced_folder. Template string `mapstructure:"template" required:"false"` SyncedFolder string `mapstructure:"synced_folder"` - // 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 - // added to your vagrant environment. + // 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 added to your + // vagrant environment. SkipAdd bool `mapstructure:"skip_add" required:"false"` // Equivalent to setting the // --cacert