Commit Graph

211 Commits

Author SHA1 Message Date
Brian Cain 6f00eb5679
Move trigger options into own plugin class 2018-04-20 10:51:38 -07:00
Brian Cain fdf1b58570
Introduce ids for trigger blocks 2018-04-20 10:51:38 -07:00
Brian Cain bb2f3b35b9
Add basic unit test 2018-04-20 10:51:38 -07:00
Brian Cain 7cccddc009
Add basic scaffolding for command parsing 2018-04-20 10:51:38 -07:00
Brian Cain 01b904061d
Use proper command reference for command whitelist params 2018-04-20 10:51:38 -07:00
Brian Cain 0142722787
Add run and run_remote scaffolding 2018-04-20 10:51:38 -07:00
Brian Cain 813ffd06ec
Add more trigger config options 2018-04-20 10:51:38 -07:00
Brian Cain a194057fc0
Add trigger config plugin 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 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
Brian Cain b02f110cd8 (#7855) Introduce more ssh options for machines
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.
2017-06-15 16:29:53 -07:00
Brian Cain 3baa142e7c (#7685) Add a unique identifier to provision objects
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`.
2017-06-13 15:46:14 -07:00
Chris Roberts 6d3ab39b27 Merge pull request #7035 from pravinchandar/4608
Fix for #4608: Support for port forwarding in an IP aliased environment
2017-03-03 15:57:04 -08:00
Chris Roberts 2dcb47410f Merge pull request #7976 from chrisroberts/ssh/shell-compat
Allow custom generation of environment variable exports
2016-11-09 16:14:33 -08:00
Chris Roberts d528902edc Make guestpath an optional parameter for synced_folders 2016-11-08 15:33:30 -08:00
Jonathan A. Sternberg c3438ff8f6 Allow overriding the inferred name from `config.vm.synced_folder`
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.
2016-11-08 14:56:29 -08:00
Chris Roberts dfc5e0d9a0 communicator/ssh: Allow custom generation of environment variable exports 2016-11-08 09:50:39 -08:00
Chris Roberts 26b3a303d2 config/vm: cast box version to string before string operations 2016-10-06 16:16:59 -07:00
Seth Vargo 3f27af7e95
core: Provide a way to globally disable box update checking
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
2016-06-18 14:46:46 -04:00
Seth Vargo d44fcf2d52
Allow customization of keys_only & paranoid SSH
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
2016-05-29 18:03:03 -04:00
Kierran McPherson 3bff55034a kernel/v2: Reimplement 8655d21 to always forward SSH
Fixes #7202
Always forwards SSH even if WinRM is set
2016-05-04 17:26:44 +12:00
Pravinchandar Raajendiran af9d0df635 Fix for #4608
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
2016-02-14 22:16:24 +11:00
Mitchell Hashimoto 45212a9b67 core: avoid crash case with nil [GH-6730] 2015-12-24 12:38:14 -08:00
Gilles Cornu 68d9708ca7 kernel/v2: fix a bug in WinRM port forwarding
Without this change a custom "winrm-ssl" port forwarding rule
could be wrongly shadowed in absence of a "winrm" custom rule.
2015-11-23 18:51:12 +01:00
Eli Skeggs 2b9173e15a Support environment variable forwarding, fixes #4131
Signed-off-by: Eli Skeggs <eskeggs@globesherpa.com>
2015-11-19 16:25:54 -08:00
Mitchell Hashimoto 8886a20d34 Merge pull request #6150 from pwnall/patch-2
Don't warn about an .1 IP for DHCP networks
2015-11-18 12:04:52 -08:00
Mitchell Hashimoto dbcc936a71 kernel/v2: box is optional if clone is set 2015-10-08 12:41:16 -04:00
Mitchell Hashimoto 20310dce0c noop 2015-10-08 11:59:30 -04:00
Mitchell Hashimoto 06f8595bc0 kernel/v2: clone option 2015-10-08 11:59:09 -04:00
Victor Costan 4425d91d86 Don't warn about an .1 IP for DHCP networks
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).
2015-08-15 06:53:01 -04:00
Mitchell Hashimoto cea44847de Merge branch 'filter_synced_folders' of https://github.com/maxlinc/vagrant into maxlinc-filter_synced_folders 2015-07-09 15:05:52 -06:00
Mitchell Hashimoto 3cad495064 Merge pull request #5887 from msabramo/config.ssh.ssh_command
Add setting config.ssh.ssh_command
2015-07-09 14:24:48 -06:00
Mitchell Hashimoto c1508cd893 kernel/v2: customizable sudo_command [GH-5573] 2015-07-09 09:30:47 -06:00
Mitchell Hashimoto 45a5bc3bd9 kernel/v2: make provisioner name show up on invalid [GH-5902] 2015-07-08 17:50:36 -06:00
Mitchell Hashimoto f5e38a4a14 kernel/v2: not an error if synced folder guest path is empty [GH-4833] 2015-07-06 14:58:48 -06:00
Mitchell Hashimoto fec6ef11c8 provisioners/puppet: just quiet the NFS errors for Puppet [GH-5456] 2015-07-06 11:19:32 -06:00
Marc Abramowitz 9240ea30b6 Add setting config.ssh.ssh_command
Lets the user specify what ssh to use or even direct Vagrant to use an
ssh wrapper like sshrc (https://github.com/Russell91/sshrc).
2015-07-01 23:33:13 -07:00
Seth Vargo 6b2ef13785 Be more defensive when trying to get the line number
Since this is the last line of defense before raising an error, we want to make
sure we don't cause an error while trying to render the error.
2015-05-31 18:32:23 -07:00
Adam Spiers ce13051d61 eliminate guesswork with Vagrantfile errors
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.
2015-05-31 18:25:51 -07:00
Dmitry Moskalchuk 26e3994319 Add option to enable trusted HTTP redirects 2015-05-31 09:34:02 -07:00
Max Lincoln a317a4d50d Ensure allowed_synced_folder_types is a list of symbols 2015-01-20 16:18:05 -05:00
Max Lincoln d781dce8f8 Filter synced folders by allowed_synced_folder_types 2015-01-20 16:18:05 -05:00
Max Lincoln e07f229f6e Merge branch 'master' of github.com:mitchellh/vagrant into winrmssl 2015-01-20 16:00:20 -05:00
Seth Vargo 39233e802f Validate pushes in the global config 2015-01-07 15:51:20 -05:00
Seth Vargo d2874064f4 Use .key? instead of .has_key? 2015-01-05 18:29:01 -05:00
Mitchell Hashimoto 4efb401050 kernel/v2: push config keys on strategy
/cc @sethvargo - This adds more tests that fail if this change isn't in
place.
2014-12-14 22:24:14 -08:00
Seth Vargo 214a79e057 Pushes are hashed by name, not strategy.
@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.
2014-12-14 23:32:32 -05:00
Mitchell Hashimoto 84ae22e976 kernel/v2: fix push strategy config lookup 2014-12-12 01:36:39 -08:00