Commit graph

435 commits

Author SHA1 Message Date
Brian Cain
956ed004bb
Update trigger config merge function 2018-04-20 10:51:38 -07:00
Brian Cain
abb6d77442
Move location of command validator 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
42419bbd49
Fix rspec tests 2018-04-20 10:51:38 -07:00
Brian Cain
d0d69e59c9
Update return doc string on validate 2018-04-20 10:51:38 -07:00
Brian Cain
60c4ffa8a6
Ensure run & run_remote are Hashes before updating to shell config 2018-04-20 10:51:38 -07:00
Brian Cain
e752878de9
Update finalize method for run and run_remote objects 2018-04-20 10:51:38 -07:00
Brian Cain
d3dde739fe
Update trigger code docs 2018-04-20 10:51:38 -07:00
Brian Cain
1591ae9916
Make run and run_remote settings shell provisioner configs 2018-04-20 10:51:38 -07:00
Brian Cain
f0ec7c750b
Potential solution for trigger validation when guest is defined
Send the defined before and or after triggers in the merge function if
triggers exist already
2018-04-20 10:51:38 -07:00
Brian Cain
51e4118cc2
Debug commit 2018-04-20 10:51:38 -07:00
Brian Cain
0cbf6970fc
Update config class setting 2018-04-20 10:51:38 -07:00
Brian Cain
607368a66c
Introduce merge function to preserve internal state 2018-04-20 10:51:38 -07:00
Brian Cain
d26a925bd7
Update variable doc 2018-04-20 10:51:38 -07:00
Brian Cain
5ca1d1ab64
Finalize config in plugins finalize, improve docs 2018-04-20 10:51:38 -07:00
Brian Cain
b04f13657b
Move warning to logger rather than guest 2018-04-20 10:51:38 -07:00
Brian Cain
a96baad0d7
Add comments for later dev 2018-04-20 10:51:38 -07:00
Brian Cain
60ff2489c4
Display warning if vagrant command for trigger is not found 2018-04-20 10:51:38 -07:00
Brian Cain
8e72ae5bd6
Add basic validation for trigger config objects 2018-04-20 10:51:38 -07:00
Brian Cain
375e8d7153
Remove old comments 2018-04-20 10:51:38 -07:00
Brian Cain
3c5e4b2464
Fix variable doc 2018-04-20 10:51:38 -07:00
Brian Cain
50ecf45d50
Add more doc to create_trigger function 2018-04-20 10:51:38 -07:00
Brian Cain
c10ae070b6
Store correct command for trigger 2018-04-20 10:51:38 -07:00
Brian Cain
e0a5b1d647
Parse block trigger configs 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
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
Max Lincoln
3e8fdc0ca4 WinRM SSL support 2014-12-11 15:07:34 -05:00
Seth Vargo
9af7675bd3 Use a more readable version for setter 2014-12-08 11:35:11 -08:00
Seth Vargo
411c7d6f75 Define finalize! and __compiled_pushes for Push config 2014-12-08 11:35:11 -08:00
Seth Vargo
03b8105571 Super primitive implementation of Environment#push 2014-12-08 11:35:10 -08:00
Mitchell Hashimoto
6ea8dc8e20 core: cleaner output of what provisioner is running if named 2014-10-23 18:47:03 -07:00
Mitchell Hashimoto
97f9948fce core: provisioners are defined differently now 2014-10-23 18:40:14 -07:00
Mitchell Hashimoto
ad758bf69a core: prefer providers in the Vagrantfile [GH-3812] 2014-10-23 15:32:54 -07:00
Matt Wrock
461f6f1281 do not automatically add /vagrant synced folder if another folder is already assigned to current path 2014-10-20 23:13:13 -07:00
Mitchell Hashimoto
8655d212c3 kernel/v2: always forward SSH [GH-4437] 2014-09-04 14:19:47 -07:00
Mitchell Hashimoto
a53156e426 core: don't allow '/' in VM name [GH-4289] 2014-08-11 09:21:31 -07:00
Mitchell Hashimoto
b675be383b core: disallow brackets in VM names [GH-4319] 2014-08-10 21:05:29 -07:00
Franz Pletz
6def193567 Add config.vm.box_server_url setting
This commits adds a new config setting `config.vm.box_server_url` to set
the URL of a local VagrantCloud instance in the Vagrantfile. If the
environment variable `VAGRANT_SERVER_URL` is set, it will still be
preferred.
2014-08-01 14:38:55 +02:00
Kalman Hazins
bb052366f7 Change symbols inside hashes to 1.9 JSON-like syntax 2014-05-22 12:35:12 -04:00
Mitchell Hashimoto
07dbe40e98 Merge pull request #3848 from shtouff/feat-capath
added capath option to curl Downloader
2014-05-20 20:50:26 -07:00
Mitchell Hashimoto
f94b902023 kernel/v2? more clever: default port to guest port 2014-05-20 20:31:53 -07:00
Mitchell Hashimoto
8856bab04b kernel/v2: default SSH port to 22 2014-05-20 20:31:14 -07:00
Rémi Paulmier
00a2670406 added capath option to curl Downloader 2014-05-19 18:08:23 +02:00
Mitchell Hashimoto
72de106c8f Update CHANGELOG 2014-05-17 12:21:12 -07:00
YungSang
2c688fda16 Set disabled even if no disabled option
to override the previous settings
2014-05-13 15:07:23 -07:00
Mitchell Hashimoto
a9029842a6 kernel/v2: multiple synced folder lines override each other 2014-05-08 18:39:13 -07:00
Mitchell Hashimoto
434a13b4e4 kernel/v2: automatically forward winrm if comm is winrm [GH-3685] 2014-05-08 17:00:55 -07:00
Mitchell Hashimoto
1ae99e3a2e kernel/v2: convert network type to symbol earlier 2014-05-08 13:38:40 -07:00
Mitchell Hashimoto
338328fa15 kernel/v2: hostnames can be one character [GH-3713] 2014-05-08 09:10:13 -07:00
Brian Pitts
9f62216f87 Remove check for nfs in config 2014-05-03 16:10:01 -05:00
Mitchell Hashimoto
7ee9b7cd42 kernel/v2: make sure communicator is a symbol 2014-04-21 13:56:41 -07:00
Mitchell Hashimoto
bad6537e86 kernel/v2: provider configs do proper merge logic for config 2014-04-21 13:56:14 -07:00
Mitchell Hashimoto
61ffa53134 kernel/v2: boxes can be optional if a provider says so
/cc @fgrehm - For the DOcker provider, we can now make boxes optional. :)
No more dummy boxes!
2014-04-21 13:53:03 -07:00
Mitchell Hashimoto
316aaa69fe kernel/v2: box setting should be new-style 2014-04-21 13:53:01 -07:00
Mitchell Hashimoto
485422640e core: delete the preserve_order option so it doesn't invalidate 2014-04-21 13:52:31 -07:00
Mitchell Hashimoto
aad8e7f80d core: provision "once" or "always" [GH-2421] 2014-04-21 13:52:30 -07:00
Mitchell Hashimoto
f6fb9016a1 core: can specify a "post_up_message" [GH-1968] 2014-04-21 13:52:28 -07:00
Mitchell Hashimoto
40d89cf5ea kernel/v2: configurable communicator (doesn't do anything yet) 2014-04-21 13:51:01 -07:00
Mitchell Hashimoto
20473fe4ca core: allow overriding default SSH port [GH-3474] 2014-04-15 10:37:08 -07:00
Mitchell Hashimoto
541ebd8935 kernel/v2: clear ID field so its not passed to provisioner [GH-3424] 2014-04-10 08:42:11 -07:00
Mitchell Hashimoto
d1caf8c624 core: Allow direct box adding again 2014-04-02 19:45:49 -07:00
Mitchell Hashimoto
3302bd535f kernel/v2: check if type is set before validation 2014-04-02 15:19:36 -07:00
Mitchell Hashimoto
84f7c019f9 kernel/v2: allow private network type to be a string [GH-3349] 2014-04-01 21:57:23 -07:00
Paulo Bittencourt
1f694d4978 kernel/v2: allow provisioner plugins to register without config 2014-03-19 17:37:52 -04:00
Mitchell Hashimoto
012c28606f kernel/v2: validate forwarded ports [GH-3187] 2014-03-13 08:32:05 -07:00
Mitchell Hashimoto
75dcc828ad kernel/v2: fix error where options could be not hash 2014-02-18 10:41:14 -08:00
Mitchell Hashimoto
12b2572687 kernel/v2: capture error if provider config is bad [GH-2959] 2014-02-11 11:55:04 -08:00
Mitchell Hashimoto
848fe5d166 kernel/v2: check for box updates by default
/cc @pearkes @armon
2014-02-05 21:20:33 -08:00
Mitchell Hashimoto
b5157df2cc core: BoxCheckOutdated only runs if told to 2014-02-05 21:20:14 -08:00
Mitchell Hashimoto
d40ff9c390 kernel_v2: test for box_url 2014-02-05 21:20:01 -08:00
Mitchell Hashimoto
b2fa785d07 core: Environment loads proper version of box 2014-02-05 21:19:51 -08:00
Mitchell Hashimoto
5030a16f84 kernel/v2: default all configs properly, remove config/default.rb 2014-02-05 15:36:35 -08:00
Teemu Matilainen
ca56c913aa kernel/v2: fix provisioner config with blocks
Regression from 10d5416.
2014-02-04 00:51:01 -03:00
Mitchell Hashimoto
feeaa69615 kernel/v2: finalize the provisioner configs 2014-02-03 22:28:41 +01:00
Mitchell Hashimoto
2cc56119b7 kernel/v2: support the preserve_order option (documented) 2014-02-03 22:03:20 +01:00
Mitchell Hashimoto
3aaa57cac9 kernel/v2: support merging properly 2014-02-03 21:30:01 +01:00
Mitchell Hashimoto
10d5416a90 kernel/v2: support overriding provisioner settings 2014-02-03 16:56:39 +01:00
Mitchell Hashimoto
ac439852ff kernel/v2: allow IPs to end in ".1" [GH-2914] 2014-02-03 12:02:14 +01:00
Fabio Rehm
dd9d20af88 Make sure synced folder types are always symbols
This will make sure that plugins that define synced folders after this
config object has been finalized won't have trouble because of
forgetting to use symbols instead of strings.

References https://github.com/fgrehm/vagrant-cachier/issues/76
2014-02-01 16:01:05 -02:00
Mitchell Hashimoto
e2af545182 kernel/v2: a host always exists, remove dumb check 2014-01-07 21:20:28 -08:00
Mitchell Hashimoto
bdb88da743 hosts/bsd: convert to new style 2014-01-07 20:39:24 -08:00
Mitchell Hashimoto
93e365bb33 core: Vagrant::Environment uses new host settings 2014-01-07 19:11:08 -08:00
Mitchell Hashimoto
b3a9e6a088 insert_public_key cap, and use that if it exists 2014-01-03 11:13:21 -08:00
Mitchell Hashimoto
e115322e78 core: accept passwords in ssh_info 2014-01-03 09:48:35 -08:00
Mitchell Hashimoto
e83070371d kernel/v2: fix validation on checksum types 2013-12-03 18:46:22 -08:00
Mitchell Hashimoto
72edddbb09 core: do proper type conversions for box checksum types 2013-12-01 23:03:21 -08:00
Mitchell Hashimoto
555f4c7dcf kernel/v2: support checksum on box config 2013-12-01 23:03:21 -08:00
Mitchell Hashimoto
db9c8dd6b3 core: validate box_download_ca_cert_file, expand 2013-11-26 21:10:33 -08:00
Mitchell Hashimoto
d0f14250d6 core: can specify config.vm.box_download_ca_cert 2013-11-26 19:35:04 -08:00
Mitchell Hashimoto
d7b74ca8b9 core: config.vm.box_url can be array of urls [GH-1958] 2013-11-25 21:57:20 -08:00
Mitchell Hashimoto
d88e3dcff2 kernel/v2: new style default box url 2013-11-25 18:46:54 -08:00
Mitchell Hashimoto
7d1fe7c6fe kernel/v2: properly set default value for client cert 2013-11-25 16:51:22 -08:00
Mitchell Hashimoto
13b52f6b6e Merge branch 'client-certs' of https://github.com/sthulb/vagrant into sthulb-client-certs
Conflicts:
	config/default.rb
	lib/vagrant/action/builtin/handle_box_url.rb
	plugins/commands/box/command/add.rb
2013-11-25 16:50:11 -08:00
Mitchell Hashimoto
45e09eb677 core: allow multiple private keys [GH-907] 2013-11-25 15:45:39 -08:00
Mitchell Hashimoto
6baab10df4 communicators/ssh: pty can be enabled 2013-11-24 16:48:07 -08:00
Mitchell Hashimoto
0425d1712b synced_folders/nfs: config goes here 2013-11-23 10:49:51 -08:00
Mitchell Hashimoto
850c9ea7a6 kernel: handle new NFS types 2013-11-22 17:22:47 -08:00
Sam Gronblom
9a7ca06cfa Disallow dot and hyphen as first character of hostnames
- Causes hostname to be set to an invalid value on some systems which
  also causes malfunction of hostname -f so it cannot be changed
2013-10-10 14:42:48 +09:00
Mitchell Hashimoto
5e468dd110 core: Convert FP ports to ints [GH-2173] 2013-09-15 17:29:49 -07:00
Mitchell Hashimoto
1769fbcba8 core: dup option hashes everywhere 2013-09-05 14:26:53 -07:00
Mitchell Hashimoto
0b94ed44b7 core: dup the synced folder options [GH-2134] 2013-09-05 14:25:38 -07:00
Mitchell Hashimoto
4c35f6d071 core: exec with the proxy command if specified 2013-09-04 17:23:43 -07:00
Mitchell Hashimoto
763bdc42f4 Merge pull request #1537 from wormzer/master
communicator/ssh: Additional proxy_command option
2013-09-04 17:18:59 -07:00
Mitchell Hashimoto
df02ddb68c core: note backwards incompat in code 2013-09-01 12:27:15 -07:00
Mitchell Hashimoto
e5b35d1c83 core: support "mount_options" for arbitrary mount options [GH-1029] 2013-09-01 12:25:21 -07:00
Mitchell Hashimoto
5a4c06f75e core: config.ssh.timeout => config.vm.boot_timeout 2013-08-29 16:41:36 -07:00
Mitchell Hashimoto
c38fadfd2f core: config.vm.graceful_halt_timeout to specify graceful halt timeout 2013-08-29 16:38:02 -07:00
Mitchell Hashimoto
261d0ef6cd core: WaitForCommunicator - more robust wait for boot
This is a new built-in middleware that is more robust for
waiting for boots. The "max_tries" configuration is now gone, it is
timeout based. Future commits will make this even better as the
SSH communicator will implement the new "wait_for_ready" in a better
way.
2013-08-29 16:27:00 -07:00
Mitchell Hashimoto
0e9711d0dd kernel: config.vm.host_name works again 2013-08-28 17:17:07 -07:00
Mitchell Hashimoto
29aab20a9d core: nitpick the protocol forwarded port checking 2013-08-28 16:32:47 -07:00
Michael Lex
172a5dac5a allow port-forwarding of the same port number but with different protocols [GH-1108] 2013-08-16 12:10:03 +02:00
Mitchell Hashimoto
2282a88f3d Convert config.vm.hostname to string [GH-1999] 2013-07-28 12:08:49 -07:00
Mitchell Hashimoto
aeb1fa7ecb unnecessary '!' 2013-07-27 22:21:37 -07:00
Mitchell Hashimoto
632349710e Convert hostpath to string on windows so gsub works 2013-07-27 22:20:55 -07:00
Mitchell Hashimoto
fc7c8b1e99 Replace '\' with '/' on synced folders on Windows 2013-07-23 17:36:48 -05:00
Mitchell Hashimoto
2d16588952 Validation so private network IP doesn't end in .1 [GH-1750] 2013-07-20 00:43:42 -04:00
Mitchell Hashimoto
b2d1a26dcf NFS request is silently ignored on Windows [GH-1748] 2013-07-20 00:38:58 -04:00
Mitchell Hashimoto
af66f5f930 box_download_insecure to not validate https of box_url [GH-1712] 2013-07-20 00:18:02 -04:00
Mitchell Hashimoto
7fd363a2f4 Shared folder target path can be a Windows path [GH-1688] 2013-07-20 00:00:49 -04:00
Mitchell Hashimoto
04afd11fd1 Shared folder inheritence doesn't overwrite multi-vm [GH-1935] 2013-07-17 23:18:39 -04:00
Simon Thulbourn
ea9fde9433 Merge branch 'master' into client-certs 2013-07-02 09:29:39 +01:00
Mitchell Hashimoto
cf2f6da4db Validate an IP is given for a private network [GH-1788] 2013-06-09 13:46:46 -07:00
Mitchell Hashimoto
80f06605fb config.vm.guest now forces guest setting again [GH-1800] 2013-06-09 13:17:23 -07:00
Simon Thulbourn
97f9206787 adds accessor for client_cert 2013-05-23 14:44:52 +01:00
Mitchell Hashimoto
9dd582be3a Compile the provider overrides early so config caching works 2013-04-19 23:16:09 -06:00
Mitchell Hashimoto
e64696e839 Automatically override forwarded ports if host ports match 2013-04-10 15:37:04 -07:00
Mitchell Hashimoto
f48587bcd1 Shared folders with the same guest path overwrite each other 2013-04-10 10:44:53 -07:00
Mitchell Hashimoto
5690aef4b0 Don't duplicate names when defining new machines in VFile 2013-04-09 19:05:35 -07:00
Mitchell Hashimoto
41d6553a5d Don't allow the forward_* SSH option sto be default, no sense 2013-04-08 21:03:51 -07:00
Mitchell Hashimoto
d03938e3c1 config.ssh properly overrides provder-detected [GH-1479] 2013-04-08 20:50:15 -07:00
Mitchell Hashimoto
7fa9892b75 Send SSH keep-alive packets [GH-516] 2013-04-07 21:51:14 -07:00
Mitchell Hashimoto
4ffc2c3b74 Invalid configuration keys are caught and shown in user friendly way
[GH-1484]
2013-04-03 16:18:37 -07:00
Mitchell Hashimoto
52a2f48b20 Provider-specific configuration overrides via 2nd block param
Example:

Vagrant.configure("2") do |config|
  # ...

  config.vm.provider :virtualbox do |p, vb_config|
    vb_config.vm.box = "virtualbox_box"
  end
end
2013-04-03 14:57:14 -07:00
Matt Wormley
00c9f2c973 added ssh.proxy_command to handle waiting for aws ssh connection when ssh proxy in place. use config.ssh.proxy_command = "ssh -q <user>@<proxy_host> nc %h %p" 2013-04-03 13:54:47 -07:00
Mitchell Hashimoto
749b7b7d70 Update SSH config to be more modern 2013-04-03 12:49:59 -07:00
Mitchell Hashimoto
0f0c0b0396 Add max redirects for download 2013-04-03 12:01:12 -07:00
Mitchell Hashimoto
5e2549fe8b Add "--insecure" flag for downloader 2013-04-03 11:57:40 -07:00
Mitchell Hashimoto
a8a7a7865d Show an error if an invalid network type is used 2013-04-02 15:00:18 -07:00
Mitchell Hashimoto
7e1c313ff5 Properly detect in valid provisioners 2013-03-30 14:39:29 -07:00
Mitchell Hashimoto
40250843b3 More comprehensive synced folder validation [GH-1499] 2013-03-29 12:45:44 -07:00
Mitchell Hashimoto
361cc1ae40 Proper error message if invalid provisioner is used [GH-1515] 2013-03-28 15:38:32 -07:00
Mitchell Hashimoto
9a29cecfdf Turn network, provider, and provisioner names into symbols if not 2013-03-15 22:14:04 -07:00
Mitchell Hashimoto
6e7427ca4d Error if forwarded port with same host port is declared multiple times 2013-03-15 22:11:49 -07:00
Fabio Rehm
dacd8be306 Auto remove trailing slashes from synced folders default ids
VirtualBox provider was having a hard time mounting the folders down
here.
2013-03-09 18:15:17 -03:00
Mitchell Hashimoto
98a9b47567 Validate the hostname setting 2013-03-09 10:07:55 -08:00
Mitchell Hashimoto
ad0e6deb3e Better handling of merging sub-vms 2013-03-08 21:30:09 -08:00
Mitchell Hashimoto
2431fe73b8 config.ssh.password is not used 2013-03-02 15:47:58 -08:00
Mitchell Hashimoto
c80ad12336 Validate forwarded ports 2013-03-01 17:20:31 -08:00
Mitchell Hashimoto
1f2856bdf3 Default the proper hostname for config 2013-03-01 17:12:17 -08:00
Mitchell Hashimoto
3726f8d8de Properly use new networks for built-in SSH 2013-03-01 17:07:31 -08:00
Mitchell Hashimoto
c586999a0b Properly scope network configs by type 2013-03-01 17:02:53 -08:00
Mitchell Hashimoto
d07810af58 Properly merge networks 2013-03-01 16:49:06 -08:00
Mitchell Hashimoto
58871853f5 Hashes for all the networks 2013-03-01 16:31:54 -08:00
Mitchell Hashimoto
934238bba0 Rename config.vm.host_name to config.vm.hostname for V2 2013-02-27 21:29:11 -08:00
Mitchell Hashimoto
5d82123da9 VirtualBox should use the new port forwarding collision detection stuff 2013-02-26 13:38:00 -08:00
Mitchell Hashimoto
455845d591 Merging networks works again 2013-02-18 17:14:25 -08:00
Mitchell Hashimoto
7d32c75141 Remove V2 forwarded ports config because it is unused 2013-02-18 17:14:25 -08:00
Mitchell Hashimoto
6afb4326fa Move NFS to a built-in middleware 2013-02-08 15:34:04 -08:00
Mitchell Hashimoto
a09c72d84e Properly default provider configs if not specified 2013-02-05 21:33:00 -08:00
Mitchell Hashimoto
79beefdb0a Do proper provider configuration merging 2013-02-05 12:22:00 -08:00
Mitchell Hashimoto
2eeccf085b Refactor the provider config a bit to allow multiple blocks 2013-02-05 12:08:17 -08:00
Mitchell Hashimoto
9156be0f84 Use the proper config version in config.vm.define calls 2013-01-30 19:24:09 -08:00
Mitchell Hashimoto
eed24a08e3 Typo in setting up synced folders 2013-01-28 15:57:13 -08:00
Mitchell Hashimoto
9cb86706b8 Make all the VirtualBox middleware aware of synced folders 2013-01-23 09:42:19 -08:00
Mitchell Hashimoto
4059a4ba2f Define synced_folders on V2 vm config 2013-01-23 09:21:49 -08:00
Mitchell Hashimoto
1bf08f70d6 Add the new graceful_halt settings to config.vm 2013-01-22 11:37:49 -08:00
Mitchell Hashimoto
58eac7117b Only merge provider/provisioner errors if they exist 2013-01-18 13:36:12 -08:00
Mitchell Hashimoto
d64c164727 VM configuration only validates the active provider 2013-01-18 13:33:02 -08:00
Mitchell Hashimoto
515ed8f119 Validate providers and provisioners! 2013-01-18 12:56:19 -08:00
Mitchell Hashimoto
3f3c7027aa Machine objects are passed into validate instead of env 2013-01-18 12:43:53 -08:00
Mitchell Hashimoto
3e9e422ce0 Convert existing validate methods to new API for kernel 2013-01-18 12:33:37 -08:00
Mitchell Hashimoto
cf2cca3b7c Revamp the configuration internal state for defining provisioners 2013-01-13 16:02:48 -08:00
Mitchell Hashimoto
212e634c3b Make Provision a built-in action.
This allows other providers to just use it.
2013-01-12 16:22:37 -08:00
Mitchell Hashimoto
7e5f175d2c Check port collisions now uses the new high-level networking 2013-01-11 14:44:27 -08:00
Mitchell Hashimoto
a2cf0270a3 Remove network validation on config. We'll re-add this later. 2013-01-04 16:13:02 -10:00
Mitchell Hashimoto
5c950d8200 Remove old forward_port method for configuration. Use network 2013-01-04 15:48:54 -10:00
Mitchell Hashimoto
cd969e1e05 Remove the dotfile_name configuration option.
The dotfile is gone now so the configuration option is obselete
2012-12-26 21:45:24 -08:00
Mitchell Hashimoto
d54d58c09c Call finalize! properly on provider configurations 2012-12-26 21:44:43 -08:00
Mitchell Hashimoto
54a2f6b89e Change boot_mode to a provider config gui.
OLD:

config.vm.boot_mode = :gui

NEW:

config.vm.provider :virtualbox do |vb|
  vb.gui = true
end
2012-12-25 09:00:06 -08:00
Mitchell Hashimoto
e88d735cb6 Make configured VM providers default to an empty one 2012-12-23 16:29:25 -08:00
Mitchell Hashimoto
553d4a828a Make sure provider config is always available even if no block was given 2012-12-23 16:29:25 -08:00
Mitchell Hashimoto
6478139cee Move config.vm.customize to VirtualBox specific option 2012-12-23 16:29:25 -08:00
Mitchell Hashimoto
1ee470a551 Begin work on supporting provider-specific configuration
This works by registering a `config` with `:provider => true` with the
same name as your provider. Vagrant will then automatically configure
the provider when `config.vm.provider` is used.
2012-12-23 16:29:24 -08:00
Mitchell Hashimoto
b6c6614fd8 Basic upgrade support for the vm config settings. VERY basic. 2012-12-23 16:29:24 -08:00
Mitchell Hashimoto
67855be77b Add the Environment#machine method
This will eventually replace the Environment#vms method. Because of the
introduction of providers, the environment doesn't know what the backing
of the machines will be (and they're _machines_ now, not _vms_).
Instead, users of Environment will now call `#machine` on the
environment to retrieve a machine with the given backing provider as it
needs it.
2012-11-07 21:45:09 -08:00
Mitchell Hashimoto
83e99bbe4e config.vm.provider (although it doesn't do anything yet) 2012-11-07 20:38:41 -08:00
Mitchell Hashimoto
d254d6f718 Configure the V2 kernel. 2012-11-06 21:28:44 -08:00