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.
Rescue and re-wrap any errors encountered when running the post
rsync capability. Rescue this exception type and notify of error
when encountered by rsync auto. Include test coverage.
When checking if the hostnamectl command should be used for configuring
the guest hostname, ensure the command returns a valid result. The
hostnamectl command relies on dbus and if dbus is not available the
command will simply fail.
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
The #urlsafe_encode64 method complies with RFC 4648 but as the documentation
points out it uses the "URL and Filename Safe Alphabet". The #strict_encode64
method does not, and does not include linefeeds.
Fixes#10438
This commit introduces a special flag for enabling features that are not
ready for release. It can either be enabled by setting the
`VAGRANT_EXPERIMENTAL` flag to "1", or by setting it to a string of one
or more comma seperated values for specific features. It also adds a
couple of Vagrant developer focused methods for making it easier to
determine if the flag has been enabled, and if so, what features.
This commit updates the behavior of printing the checkpoint version
check for Vagrant. To allow users to filter out the message, it updates
the version check to go to stderr. It updates the UI class for printing
the version check to be a "basic" class, so that the message continues
to be the same color instead of a red error message.
Prior to this commit, Vagrant would attempt to path expand a file that
didn't exist if it was left out of the passed in arguments and no
`--url` was used for external box uploading. This commit fixes that by
adding some additional validation for the passed in box file.
This commit updates how the trigger `run` inline option works by only
applying `Shellwords.split` to the inline command if it is going to be
run on non-Windows hosts. Otherwise pass the inline script directly to
be executed by Powershell.
Prior to this commit, if a windows path contained a space, the ssh
utility could not properly find the private key path and the ssh command
would fail. This commit adds some additional logic to the ssh utility to
check if a path contains '%', and if so, use the IdentityFile argument.
Otherwise it will default to passing in the private key file with '-i',
which can support paths with spaces.
The project local metadata file may contain invalid information to properly
lookup the configured box. This may occur if the file has been moved,
modified, or the backing box has been removed. In those cases, fall back
to the configuration defined in the Vagrantfile to load the box.
In recent Rubies the first dependency to satisfy the constraint will
be used regardless if higher versions are available in subsequent
sources. Move custom source to start of list when resolving plugins
to provide desired behavior.
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.