98 Commits

Author SHA1 Message Date
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
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
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
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
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
dafb60ad4f
Update experimental feature flag for disk 2020-02-12 15:38:34 -08:00
Brian Cain
c179b2fb22
Include updated unit tests for disk ext update 2020-02-12 13:51:59 -08:00
Brian Cain
b11aa53294
Remove unused experimental flag for disk enablement 2020-02-10 13:03:58 -08:00
Brian Cain
718332b35e
Fixup disk tests 2020-02-10 12:58:11 -08:00
Brian Cain
f55aca091c
Wrap disk feature in experimental flag 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
a457dee8b0
Set default disk to non-primary 2019-11-22 14:40:23 -08:00
Brian Cain
f01c90e676
Rename rspec test name 2019-11-22 14:40:23 -08:00
Brian Cain
87366cf4f3
Add basic disk config unit tests 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
68e21d8ac5
Merge pull request #10664 from chrisroberts/f-plugin-config-format
Fix format finalization of plugins in Vagrantfile
2019-02-12 10:00:14 -08:00
Brian Cain
0bc0bdd616
Merge pull request #10615 from briancain/introduce-typed-triggers
Introduce :type option for Vagrant triggers
2019-02-12 09:16:01 -08:00
Chris Roberts
2e58e002d6 Fix format finalization of plugins in Vagrantfile 2019-02-11 15:48:43 -08:00
Chris Roberts
61cf179b42 Add base address attribute to vm config 2019-02-01 14:47:11 -08:00
Brian Cain
fefb702359
Introduce type and command triggers
This commit introduces some basic functionality for typed triggers:

- command
- action

Command triggers are triggers that will run before or after a given
sub-command.

Action triggers are for running triggers before or after internal
actions for Vagrant. This could be before or after a provision step,
before or after synced folders, or networking, etc.
2019-02-01 13:34:15 -08:00
Chris Roberts
90a5854684 Fill out ssh options config and remote_user
Include config option within ssh_config command output template. Default
remote_user value to set username value. Include existence check on
provided config value to ensure file is available. Update tests to
include coverage on all changes. Add new options to the docs.
2018-12-11 08:09:43 -08:00
Gavin Williams
87e38a0bed Remove 'config' from ssh.defaults, and instead setup in '.connect' 2018-12-11 07:51:47 -08:00
Gavin Williams
50a569747c Use 'be_falsey' matcher 2018-12-11 07:51:47 -08:00
Gavin Williams
87437317dc Add support for passing ssh config file in via config 2018-12-11 07:51:47 -08:00
Brian Cain
6051f3598e
Fixes #10224: Allow validation of config while ignoring provider
This commit adds a new flag to the `vagrant validate` command which
allows users to completely ignore the provider block of a config file.
This is useful for when you are running `vagrant validate` in CI and
don't want to install a valid provider to check the syntax of your
Vagratnfile. When the flag is invoked, a warning will be displayed
saying that the provider block will be ignored and not validated.
2018-10-30 13:37:22 -07:00
Brian Cain
f4d618eb58
Fixes #9840: Introduce ruby option for trigger
This commit introduces a new option to the core trigger feature: `ruby`.
It can be defined to run ruby code when the trigger is configured to
fire. If you give the ruby block an env and machine argument, the
defined ruby code can use those variables internally.
2018-10-05 12:53:41 -07:00
Brian Cain
58ebd52f99
Add abort option to core triggers
This commit adds a new option `abort`, which when configured, will exit
the Vagrant process completely. If set to `true`, it will exit cleanly
with exit code 0. Otherwise, the exit code can be configured.
2018-09-25 09:40:36 -07:00
Chris Roberts
57e0bb5105 Update net-ssh constraint
Also includes mapping of verify_host_key value to new values
introduced in 5.0.0
2018-07-27 16:30:06 -07:00
Chris Roberts
859d48d5f5 Restrict synced folder access to DrvFs file systems only within WSL 2018-07-06 16:58:12 -07:00
Chris Yungmann
7fb9d3eb4f propagate unset guestpath 2018-05-08 22:51:30 -05:00
Brian Cain
0953287262
Relax only_on rspec tests
only_on can be either a string or regex
2018-04-20 10:51:38 -07:00
Brian Cain
e7274f1b6c
Improve config rspec tests 2018-04-20 10:51:38 -07:00
Brian Cain
956ed004bb
Update trigger config merge function 2018-04-20 10:51:38 -07:00
Brian Cain
7dae1acd21
Add some "default" options to be validated 2018-04-20 10:51:38 -07:00
Brian Cain
fc526a164a
Add basic create_trigger rspec test 2018-04-20 10:51:38 -07:00
Brian Cain
e157362ace
Add run and run_remote expectations 2018-04-20 10:51:38 -07:00
Brian Cain
7b1b044e72
Check for default on_error behavior setting 2018-04-20 10:51:38 -07:00
Brian Cain
6cbb5d8e5d
Add unit tests for config, fix type change bug with map! 2018-04-20 10:51:38 -07:00
Brian Cain
3dec6869bb
Update trigger unit tests 2018-04-20 10:51:38 -07:00
Brian Cain
42419bbd49
Fix rspec tests 2018-04-20 10:51:38 -07:00
Brian Cain
6f00eb5679
Move trigger options into own plugin class 2018-04-20 10:51:38 -07:00
Brian Cain
bb2f3b35b9
Add basic unit test 2018-04-20 10:51:38 -07:00
Josh Soref
1a5ddea9f4 Spelling fixes
* account
* addresses
* administrator
* afterwards
* because
* bridgeable
* capabilities
* capability
* checksum
* configuration
* configuration for
* configure
* criteria
* delimited
* delivered
* derivatives
* description
* detect
* directory
* display
* downloading
* during
* electric
* enabling
* encountered
* equivalent
* executable
* executed
* hashicorp
* hypervisor
* hyphens
* implementation
* incorporate
* inheritance
* initialize
* instance
* instead
* interactions
* invocable
* machine
* maximum
* message
* mounting
* overridden
* overwrite
* paramiko
* preparing
* provides
* provisioning
* recursively
* requested
* resetting
* retryable
* running
* satisfied
* searching
* sometimes
* specified
* successfully
* synced folders
* unauthorized
* underlying
* userprofile
* vagrant
* vagrantfile
* variable
* various
* version
* virtual
* windows
2018-03-14 14:41:04 +00:00
Chris Roberts
f2f8bc2db5 Add Vagrantfile configuration option to register sensitive values 2018-01-15 07:23:47 -08:00
Brian Cain
8b1043c199 Remove stub methods and replace with allows for rpsec 3 2017-08-04 15:02:59 -07:00