175 Commits

Author SHA1 Message Date
Chris Roberts
51adb12547 Add architecture support for boxes
Introduce support for handling box architecture. Adds a new
`box_architecture` setting that defaults to `:auto` which will perform
automatic detection of the host system, but can be overridden with a
custom value. Can also be set to `nil` which will result in it fetching
the box flagged with the default architecture within the metadata.

Box collection has been modified to allow existing boxes already
downloaded and unpacked to still function as expected when architecture
information is not available.
2023-09-14 16:15:03 -07:00
Chris Roberts
513be177d3 Remove experimental checks
Removes experimental checks on existing experimental features.
2023-09-08 14:15:34 -07:00
hashicorp-copywrite[bot]
36a312ee26
add missing license headers and update copyright file headers to BUS-1.1 2023-08-10 21:53:25 +01:00
Chris Roberts
e0dbbcc04c Use all insecure private key paths
When constructing the ssh information, use all available insecure key
paths for authentication.
2023-06-26 15:46:15 -07:00
William Bradford Clark
15df2c69b4 (#12884) Use default ssh.private_key_path when ssh.keys_only = false 2022-09-10 02:16:51 -04:00
sophia
f1e2a73bfa
Don't use just a client to instantiate a machine 2022-04-25 12:24:37 -05:00
sophia
d196b8635c
Detect Ruby guest plugin 2022-04-25 12:24:36 -05:00
Chris Roberts
a103f6fb17
Restore the machine class and update thin class to remote module 2022-04-25 12:23:59 -05:00
Chris Roberts
a37d1b70a5
Remove client autoload since it does not exist here 2022-04-25 12:23:56 -05:00
Chris Roberts
03ac9cd015
Provide machine implementation based on server mode 2022-04-25 12:23:55 -05:00
Chris Roberts
7350b85902
Implement enough of the command service to get things working.
Also updates the UI setup so that we can properly get the
    output streaming back to us.
2022-04-25 12:23:55 -05:00
sophia
cadcbe82f7
Hard code less 2022-04-25 12:23:54 -05:00
sophia
5fc0b22efd
Make machine initialization work 2022-04-25 12:23:54 -05:00
sophia
e3d8418081
Machine getters to use machine client 2022-04-25 12:23:54 -05:00
sophia
46f5fa5ab8
Machine client implementation 2022-04-25 12:23:54 -05:00
sophia
078a091709
Start replacing machine variables with calls to core service 2022-04-25 12:23:54 -05:00
sophia
4c26f5b384
Make machine with ui 2022-04-25 12:23:54 -05:00
sophia
fd74318bf5
Pass ui to machine 2022-04-25 12:23:54 -05:00
sophia
d7f92f9d87
Some update for sdk changes 2022-04-25 12:23:52 -05:00
sophia
7ff0d11582
Move protos into Vagrant module 2022-04-25 12:23:52 -05:00
sophia
a25381b03a
Get the associated requested provider 2022-04-25 12:23:51 -05:00
sophia
7a612698a5
Transform a machine arg to an instance of Vagrant::Machine 2022-04-25 12:23:51 -05:00
sophia
a806a47a1a
Decode incoming machine arg 2022-04-25 12:23:51 -05:00
sophia
a11f5a4dbf
Move proto files into more globally accessible spot 2022-04-25 12:23:51 -05:00
sophia
82e3dd55ad
Setup machine client 2022-04-25 12:23:51 -05:00
Chris Roberts
7331623a39 Only allow the ui to be overridden when running action 2020-11-02 10:30:56 -08:00
sophia
2239ee8582 Create Hash with type attribute 2020-08-19 15:00:40 -05:00
sophia
cde39e26ba Make mount options a synced_folder capability 2020-08-19 15:00:40 -05:00
sophia
afd2a28f60 Add synced_folder_capability 2020-08-19 15:00:40 -05:00
sophia
132720e3b4 Add local machine to global index of machines if it does not exist 2020-06-09 17:22:55 -05: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
Chris Roberts
1c650a7fb8 Remove whitespace from id file on load
If the id file includes whitespace, remove it. If the content of
the id file is empty, do not set the machine id.

Fixes: #10722
2019-03-11 17:08:13 -07: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
Gavin Williams
122ef7307c Flesh out :config support.
Also noticed whilst testing that if the `ProxyCommand` uses `%r`, then
it fails with `unable to find remote user`, so added support for
`config.ssh.remote_user` aswell
2018-12-11 07:51:47 -08:00
slackfan
59ecf95b0d
Remove unnessary import
Signed-off-by: Alexander Fischer <github@ordnungsdienst.org>
2018-09-18 13:56:18 -07:00
slackfan
e547b26309
Don't compare paths by String
The implemented String comparison is misleading on Windows as it does not consider that paths on Windows are case insensitive

Signed-off-by: Alexander Fischer <github@ordnungsdienst.org>
2018-09-18 13:56:17 -07:00
Brian Cain
a177bcf4b7
Ensure internal trigger fire does not get called if plugin installed
This commit wraps up the internal machine action level trigger calls if
the community vagrant-trigger plugin is installed.
2018-05-07 11:33:55 -07:00
Brian Cain
092e73d87f
(#9775) Move triggers object init in machine
Prior to this commit, the hyper-v provider called an action on a machine
that hadn't fully finished initializing. This commit fixes that by
moving up the initialization of the triggers object next to the rest of
the instance variables of the machine object.
2018-05-04 14:32:57 -07:00
Brian Cain
616b0f9ba6
Preserve returning environment after machine action gets called 2018-04-20 10:51:38 -07:00
Brian Cain
48b7c682ad
Use active machine object 2018-04-20 10:51:38 -07:00
Brian Cain
bbf4e3c521
Reduce fire trigger methods to a single method 2018-04-20 10:51:38 -07:00
Brian Cain
6373441ab2
Ensure guest name is a string 2018-04-20 10:51:38 -07:00
Brian Cain
372a6a7911
Initial trigger plugin scaffolding 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
Brian Cain
c9e5a22bff (#9062) Deprecate :paranoid in favor of :verify_host_key
As of `net-ssh` version 4.2.0, the key :paranoid has been deprecated in
favor of using :verify_host_key. This commit updates Vagrants ssh config
to use the new key, and deprecates the use of :paranoid.
2018-01-05 10:02:45 -08:00
Brian Cain
ffec0ff8d9 (#8697) Introduce extra_args setting for ssh configs
Prior to this commit, there was no way to add additional ssh arguments
within a Vagrantfile for a given vagrant machine. This commit introduces
a new option extra_args that allows users to pass in a single argument
or an array of flags that will be added onto the ssh command.
2017-08-17 09:02:20 -07:00
Chris Roberts
2575ed9dc2 Explicitly set encodings to prevent incompatible string comparisons 2017-06-26 20:00:43 -07:00
Brian Cain
1b4d7848bc Fix vagrant_cwd warnings
Prior to this commit, if a user ran a vagrant command within a subdir,
it would warn about the cwd changing which is not actually the case.
This commit adds an additional check to see if vagrant is being invoked
within a subdirectory so that it doesn't warn the user.
2017-06-19 13:05:26 -07:00