packer-cn/website/pages/partials/builder/vagrant/Config-not-required.mdx

89 lines
4.0 KiB
Plaintext

<!-- Code generated from the comments of the Config struct in builder/vagrant/builder.go; DO NOT EDIT MANUALLY -->
- `output_dir` (string) - 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.
- `checksum` (string) - The checksum for the .box file. The type of the checksum is specified
within the checksum field as a prefix, ex: "md5:{$checksum}". The type
of the checksum can also be omitted and Packer will try to infer it
based on string length. Valid values are "none", "{$checksum}",
"md5:{$checksum}", "sha1:{$checksum}", "sha256:{$checksum}",
"sha512:{$checksum}" or "file:{$path}". Here is a list of valid checksum
values:
* md5:090992ba9fd140077b0661cb75f7ce13
* 090992ba9fd140077b0661cb75f7ce13
* sha1:ebfb681885ddf1234c18094a45bbeafd91467911
* ebfb681885ddf1234c18094a45bbeafd91467911
* sha256:ed363350696a726b7932db864dda019bd2017365c9e299627830f06954643f93
* ed363350696a726b7932db864dda019bd2017365c9e299627830f06954643f93
* file:http://releases.ubuntu.com/20.04/MD5SUMS
* file:file://./local/path/file.sum
* file:./local/path/file.sum
* none
Although the checksum will not be verified when it is set to "none",
this is not recommended since these files can be very large and
corruption does happen from time to time.
- `box_name` (string) - 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.
- `insert_key` (bool) - If true, Vagrant will automatically insert a keypair to use for SSH,
replacing Vagrant's default insecure key inside the machine if detected.
By default, Packer sets this to false.
- `provider` (string) - The vagrant provider.
This parameter is required when source_path have more than one provider,
or when using vagrant-cloud post-processor. Defaults to unset.
- `communicator` (string) - Communicator
- `vagrantfile_template` (string) - What vagrantfile to use
- `teardown_method` (string) - Whether to halt, suspend, or destroy the box when the build has
completed. Defaults to "halt"
- `box_version` (string) - What box version to use when initializing Vagrant.
- `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.
- `synced_folder` (string) - Synced Folder
- `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 added to your
vagrant environment.
- `add_cacert` (string) - Equivalent to setting the
--cacert
option in vagrant add; defaults to unset.
- `add_capath` (string) - Equivalent to setting the
--capath option
in vagrant add; defaults to unset.
- `add_cert` (string) - Equivalent to setting the
--cert option in
vagrant add; defaults to unset.
- `add_clean` (bool) - Equivalent to setting the
--clean flag in
vagrant add; defaults to unset.
- `add_force` (bool) - Equivalent to setting the
--force flag in
vagrant add; defaults to unset.
- `add_insecure` (bool) - Equivalent to setting the
--insecure flag in
vagrant add; defaults to unset.
- `skip_package` (bool) - if true, Packer will not call vagrant package to
package your base box into its own standalone .box file.
- `output_vagrantfile` (string) - Output Vagrantfile
- `package_include` ([]string) - Equivalent to setting the
[`--include`](https://www.vagrantup.com/docs/cli/package.html#include-x-y-z) option
in `vagrant package`; defaults to unset