Brian Cain
cf063c6e38
Update validation to look for if provider_config is empty not nil
2020-06-30 14:22:41 -07:00
Brian Cain
192caab02d
Fix provider_config merging for disk config
2020-06-30 14:22:41 -07:00
Brian Cain
cafb6ec239
Remove extra provider_config option
2020-06-30 14:22:41 -07:00
Brian Cain
a3c2e31f01
Set default disk format for vmware_desktop
2020-06-30 14:22:41 -07:00
Brian Cain
fe7705e694
Update how disk_ext default is set
...
Prior to this commit, the default value of disk_ext was set in the
finalize! method, and was really only valid for the virtualbox provider.
This commit updates that by moving the step into the validate function,
which has access to the machines provider.
2020-06-30 14:22:41 -07:00
Chris Roberts
c9a65ac75b
Merge pull request #11688 from chrisroberts/f-trigger-all
...
Fix trigger matching on `:all` special value
2020-06-15 14:15:26 -07:00
Sophia Castellarin
a2b70bc28a
Merge pull request #11566 from soapy1/network-hostname-flag
...
Add :hostname option to network config
2020-06-12 16:51:31 -05:00
sophia
b02a78c661
Change config option to allow_hosts_modification
2020-06-12 14:50:07 -05:00
sophia
7265dd2a84
Add :hostname option to network config
...
* hostname is a boolean
* a network that sets hostname should have a static ip address
* only one network may set hostname
can be set at `config.vm.network :public_network, hostname: true, ip: "192.168.0.1"`
2020-06-12 14:44:35 -05:00
sophia
ff0aea4493
Add option to disable modification of /etc/hosts on guest
2020-06-12 14:25:19 -05:00
Sophia Castellarin
4704606056
Merge pull request #11570 from soapy1/mount-shared-folders
...
Automatically mount virtual box shared folder when machine reboots
2020-06-12 14:11:21 -05:00
Brian Cain
7b95826dd7
Add type as param for cloud_init config
2020-06-10 15:38:18 -07:00
Chris Roberts
916655dbd3
Fix trigger matching on :all special value
...
Updates the type to do a proper comparison when checking for
the `:all` special value as well as applied ignores.
Fixes #11599
2020-06-09 16:12:48 -07:00
sophia
66a3b58c08
Add provider capaiblity :has_communicator
2020-06-09 09:33:11 -05:00
Brian Cain
492a532ef5
Remove freezing symbols in disk/trigger conig
2020-06-08 15:02:44 -07:00
Brian Cain
aeeb5dfc6f
Introduce cloud_init config for Vagrant
...
This commit adds the basic config class for defining cloud_init for a
given guest
2020-06-05 10:38:24 -07:00
sophia
33c41d99dd
Raise error if trying to create an nfs syncd folder for windows
2020-06-04 11:36:53 -05:00
sophia
672859e296
Add tests and docs
2020-05-29 15:34:46 -04:00
sophia
64f5a9e57f
Validate communicator type
2020-05-29 15:33:43 -04:00
sophia
16c9e88b1c
Add communicator_require option to provisioners
2020-05-29 15:33:42 -04:00
sophia
fe7968315b
Add option to allow/disable fstab modification
...
Defaults to allow modification of fstab
2020-05-29 15:29:21 -04:00
Brian Cain
bd4181eb15
Remove whitespace
2020-05-20 10:44:14 -07:00
Brian Cain
1e1d65f81c
Ensure MapCommandOptions util is required prior to use
2020-05-20 10:43:39 -07:00
sophia
646de433a9
Validate conversion of map to cmd options
2020-04-29 15:10:48 -04:00
sophia
7e125969dd
Add option box_download_options
...
Allow users to specify a map of extra options to pass to the downloader.
These options will be passed to curl, with a `--` appended to the key
2020-04-29 15:10:44 -04:00
Chris Roberts
4546d804b1
Add support for configuring SSH connect timeout
...
Retains the original default value of 15 seconds for SSH connect
timeout. Allows users to modify this timeout via SSH communicator
option. Enforces integer values for timeout and validates custom
values are greater than 0.
2020-04-20 14:23:21 -07:00
Chris Roberts
217f2530db
Use machine specific triggers instance when machine is available in runner
2020-03-26 17:20:55 -07:00
Chris Roberts
d08c68ecf3
Adjust how trigger actions are inserted into the stack
...
This adjusts how triggers are implemented during a normal run. Any
defined triggers which are applicable are located and injected into
the run stack as the stack is built, including hook type triggers.
Support is included for dynamic hook lookup.
The data type used when defining triggers has also been relaxed to
support symbols, strings, or constants.
2020-03-17 15:07:36 -07:00
Brian Cain
baabf6650f
Check for provider capability with disk_ext types before using it
2020-02-12 15:59:37 -08:00
Brian Cain
dafb60ad4f
Update experimental feature flag for disk
2020-02-12 15:38:34 -08:00
Brian Cain
c5f4534487
Add virtualbox capability for validating disk extension types
2020-02-12 13:21:09 -08:00
Brian Cain
b11aa53294
Remove unused experimental flag for disk enablement
2020-02-10 13:03:58 -08:00
Brian Cain
f59a5c2c70
Enable virtualbox and disk config in single flag
2020-02-10 12:58:11 -08:00
Brian Cain
fddcd71eaf
Default to vdi since virtualbox default is vdi
2020-02-10 12:58:11 -08:00
Brian Cain
a3b07a884a
Add way to configure disk extension
2020-02-10 12:58:11 -08:00
Brian Cain
b388b34846
Update todos and method docs
2020-02-10 12:58:11 -08:00
Brian Cain
ffe8fcef9b
Make name required for defining non-primary disks
2020-02-10 12:58:11 -08:00
Brian Cain
ec350861cd
Write down metadata for disk configs after configuring disks
2020-02-10 12:58:11 -08:00
Brian Cain
26d922ad0e
Add todo for fixing default disk names
2020-02-10 12:58:11 -08:00
Brian Cain
a38f0bb8c0
Improve default vagrant disk name
2020-02-10 12:58:11 -08:00
Brian Cain
82b2630a80
Fixes #11358 : Actually validate synced_folder type options
...
Prior to this commit, Vagrant wouldn't validate the `type` option for
any synced_folder configs defined. This commit updates that behavior to
look at the current list of installed synced_folder plugins, and ensure
if a type is defined, it's a valid plugin in that list.
2020-01-31 09:00:27 -08:00
Brian Cain
711270b90a
Fixes #11287 : Set top level provisioner name if set in provisioner
...
config
Prior to this commit, if a user had configured a provisioner that had a
config with a `name` option, it would not properly set the top level
provisioner classes name config option which would lead to some
understanibly confusing results when trying to `--provision-with`. This
commit fixes that by checking to see if the top level name isn't set,
look to see if that provisioners config defines a name, and use that
instead.
2020-01-06 11:10:28 -08:00
Brian Cain
f8449063b6
Have default names for primary and non-primary disks
2019-11-22 14:40:23 -08:00
Brian Cain
b56dede627
Do not set primary option if it's not UNSET or false
2019-11-22 14:40:23 -08:00
Brian Cain
f55aca091c
Wrap disk feature in experimental flag
2019-11-22 14:40:23 -08:00
Brian Cain
86f9243762
Move validation message to locales
2019-11-22 14:40:23 -08:00
Brian Cain
734aad1ede
Enforce unique names for disk config objects
2019-11-22 14:40:23 -08:00
Brian Cain
b5b59a4eee
Base name for disk is vagrant_primary if primary
2019-11-22 14:40:23 -08:00
Brian Cain
ea7a230cb6
Move disk config validation messages to locales file
2019-11-22 14:40:23 -08:00
Brian Cain
57fd731fbf
Add warning if machines provider was not found in disk provider config
...
opts
2019-11-22 14:40:23 -08:00
Brian Cain
3a2b4ddef2
Validate that disk file exists in disk config validate
2019-11-22 14:40:23 -08:00
Brian Cain
2e324a4971
Add conversion method for shortcut size in disk config
2019-11-22 14:40:23 -08:00
Brian Cain
271cf8a603
Begin to add Numeric class helper for converting size strings
2019-11-22 14:40:23 -08:00
Brian Cain
7feee7a87f
Add locale for primary disk validation error
2019-11-22 14:40:23 -08:00
Brian Cain
a457dee8b0
Set default disk to non-primary
2019-11-22 14:40:23 -08:00
Brian Cain
a51e9b1fa1
Support both kinds of provider config options for disk config
2019-11-22 14:40:23 -08:00
Brian Cain
83fea21ff1
Simplify builtin disk action
2019-11-22 14:40:23 -08:00
Brian Cain
e598007237
Add provider specific disk options under provider_config hash
2019-11-22 14:40:23 -08:00
Brian Cain
6c54bf6ad9
Fix logger namespace typo
2019-11-22 14:40:23 -08:00
Brian Cain
d54e870752
Add file option to disk config
2019-11-22 14:40:23 -08:00
Brian Cain
71ad0f7aba
Remove duplicate setting of disks variable
2019-11-22 14:40:23 -08:00
Brian Cain
35f113e759
Put back accidental case switching for comments on provisioner
2019-11-22 14:40:23 -08:00
Brian Cain
9c1d05113f
Update merge comment for disk config
2019-11-22 14:40:23 -08:00
Brian Cain
93828508ec
Update config/vm with tests for disk config
2019-11-22 14:40:23 -08:00
Brian Cain
499e39dd10
Ensure primary is true or false
2019-11-22 14:40:23 -08:00
Brian Cain
a55e3d2b91
Make config.vm.disks accessible instead of internal
2019-11-22 14:40:23 -08:00
Brian Cain
c18f36e516
Fix code comment typo
2019-11-22 14:40:23 -08:00
Brian Cain
ad73969010
Fixup disk config parsing to allow hash and block
2019-11-22 14:40:23 -08:00
Brian Cain
7cfccb5cfd
Update variable docs for disk name
2019-11-22 14:40:23 -08:00
Brian Cain
ee751ca6e1
Add disk name for disk config
2019-11-22 14:40:23 -08:00
Brian Cain
995c4bbc60
Add validation for disk configs
2019-11-22 14:40:23 -08:00
Brian Cain
a18ce4f732
Add primary config option for disk
2019-11-22 14:40:23 -08:00
Brian Cain
393ce9eb1b
Rename drives to disks to match class, and properly merge configs
2019-11-22 14:40:23 -08:00
Brian Cain
28d339eac5
Ensure block is properly passed through to add_config
2019-11-22 14:40:23 -08:00
Brian Cain
ee388d8293
Ensure config is renamed to options
2019-11-22 14:40:23 -08:00
Brian Cain
34673fe5f9
Add disk class function for provider layers
2019-11-22 14:40:23 -08:00
Brian Cain
98a2d0f723
Update internal drives state to be array instead of hash
2019-11-22 14:40:23 -08:00
Brian Cain
abcc334900
Add note about disk options value
2019-11-22 14:40:23 -08:00
Brian Cain
1a21782bd5
Add note about disk name
2019-11-22 14:40:23 -08:00
Brian Cain
e361900d3a
Update doc string for name attribute
2019-11-22 14:40:23 -08:00
Brian Cain
aa5a3ef7f7
Add initial disk management config class
2019-11-22 14:40:23 -08:00
Brian Cain
0aaa2cc147
Fixes #11173 : Show guest name in hostname erorr message
...
This commit adds the machine guest name in the hostname validation error
message so that it's easier to see which guest in a Vagrantfile has the
validation error.
2019-11-04 08:41:51 -08:00
Brian Cain
a22acba467
Simplify line and path checks for exception handling in config loading
2019-09-10 13:27:23 -07:00
Brian Cain
09a37e0767
Fixes #11022 : Ensure correct line is used for windows exceptions
...
Prior to this commit, if there was a config error inside a provider
block, Vagrant wouldn't grab the right backtrace token on windows since
the api is different for ruby on Windows compared to all other
platforms. This commit ensures that the proper line number is chosen so
the error message is correct.
2019-09-06 14:00:46 -07:00
Brian Cain
99b5867559
Update reject to compact
2019-09-05 15:39:24 -07:00
Brian Cain
7b0dc8d528
Update provisioner enhancements from pull request feedback
2019-08-29 13:50:22 -07:00
Brian Cain
07bcfc6077
Add error if both before and after options are set
2019-08-28 16:15:33 -07:00
Brian Cain
fc8bf6aed4
Ensure a dependency provisioner isnt configured to rely on another dependency provisioner
2019-08-28 15:52:38 -07:00
Brian Cain
c192651e90
Make dependency provisioners experimental
2019-08-28 15:09:38 -07:00
Brian Cain
8c39d9bfed
Add dependency provisioner name to error message
2019-08-28 14:30:32 -07:00
Brian Cain
6777493c46
Include before/after options in final provision hash
2019-08-20 11:31:00 -07:00
Brian Cain
6db03f2aed
Check if rejected entries are nil, not blank
2019-08-20 11:30:42 -07:00
Brian Cain
d15bac7fb7
Validate that before/after provisioner exists in machines config
2019-08-19 14:48:06 -07:00
Brian Cain
8ecd32de53
Remove comment
2019-08-19 11:36:54 -07:00
Brian Cain
4933610398
Update rubydoc for before/after return types
2019-08-19 11:33:30 -07:00
Brian Cain
66aac23470
Properly set and validate before/after keys for base provisioner class
2019-08-19 11:23:06 -07:00
Brian Cain
28c0f6085c
Attempt to validate top scope provisioner options
2019-08-06 16:18:58 -07:00
Brian Cain
e05437ddf2
Add validation method and todo
2019-08-06 15:28:04 -07:00
Brian Cain
b82b33d204
Add new before/after options for the base Provisioner class
...
This commit adds two new options: before, after. These string options
refer to other named Provisioners.
2019-08-06 15:28:04 -07:00
Brian Cain
49ae77b2b8
Update doc string for :run option
2019-08-06 15:28:04 -07:00