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.
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.
This commit allows the user to configure two additional options that
were previously not configurable: Compression and DSAAuthentication.
Each config option is set as a boolean, and if left out of the config
will default to its previous behavior which is included and set to
"yes". If the user explicitly sets it to false, it will not be included
as an ssh option.
Prior to this commit, Vagrant had no way internally to determine if a
provisioner object was unique if the `name` property was not set.
Because of this, when vagrant went to merge configs it would duplicate
an existing unnamed provisioner since it had no way of determining if a
user actually had added the same provisioner twice. This commit fixes
that by introducing an id which will default to `name` if its set, but
if not will be set by `SecureRandom.uuid`.
If a `name` is specified as an option, it will be used as the id instead
of inferring it from the `guestpath`. If `guestpath` is nil, the `name`
needs to be specified so the folder can be mounted with a name.
This also fixes the synced folder code to allow `guestpath` to be nil.
It was allowed in a previous version for the purpose of preventing a
directory from being auto mounted (#936), but seems to have become an
error at some point after that.
An example of modifying the default /vagrant folder so it doesn't
auto-mount anymore:
config.vm.synced_folder ".", nil, name: "/vagrant"
An example of sharing another folder, but not auto-mounting it:
config.vm.synced_folder ".", nil, name: "foobar"
Fixes#6835.
This adds a new environmental variable `VAGRANT_BOX_UPDATE_CHECK_DISABLE`,
which instructs Vagrant to not check for box updates when running
regular Vagrant commands. This behaves the same as the existing
`config.vm.box_update_check` configuration option, but can be set
globally. Vagrantfile-supplied options will take precedence.
Fixes GH-7479
This adds two new SSH configuration options:
- `keys_only`
- `paranoid`
These values were previously hard-coded, but can now be user-specified.
Fixes GH-4275
Added support for Port forwarding in an IP aliased environment. The change
makes the following forwarding rule(s) possible.
Ex: eth0 is ip aliased to have a range of IP addresses 10.20.30.0/24.
In the Vagrant file, we can now have an entry like the following and
it will just work! Note the host port 8081 is the same for both .1 and .2.
Vagrant.configure("2") do |config|
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.network "forwarded_port", guest: 81, host: 8081, host_ip: 10.20.30.1
config.vm.network "forwarded_port", guest: 82, host: 8081, host_ip: 10.20.30.2
end
When the network's type is :dhcp, the :ip option is used to derive the DHCP server configuration, and it doesn't actually indicate the IP that will be received by the VM(s).
If the Vagrantfile has some kind of error, display not only
its path and the exception message, but also the originating
line number and exception class.
Also log the full backtrace when the error is in a provider
block, just as it is done when it's outside a provider block.
@mitchellh this is a partial revert of 84ae22e. It took me a little bit
to figure out why this broke everything, but then I finally realized it.
84ae22e changes the finalize! function to lookup pushes by strategy
type, but pushes are keyed by push strategy name. In other words, given:
config.push.define("foo", strategy: "bar")
the `push_configs` has will look like:
{ :foo => [:bar, #<PushConfig>] }
This is important, because if we key by strategy, the user cannot
specify the same push strategy more than once:
config.push.define("foo", strategy: "bar")
config.push.define("zip", strategy: "bar")
If we keyed off of the strategy, this would be impossible.