Commit Graph

2010 Commits

Author SHA1 Message Date
Seth Vargo c1623ee740 Fix port collision in tests 2015-11-18 18:47:19 -08:00
Seth Vargo a0c049da00 Fix tests 2015-11-18 18:32:46 -08:00
Mitchell Hashimoto be29915bed Merge pull request #6542 from mitchellh/b-dotfile
core: don't make dotfile path if no Vagrantfile
2015-11-18 18:10:19 -08:00
Mitchell Hashimoto 079ee6ea95 Merge pull request #6540 from mitchellh/b-non-http-head
core: don't do HEAD request for box on non-HTTP [GH-5477]
2015-11-18 18:09:31 -08:00
Mitchell Hashimoto 646414b347 core: don't make dotfile path if no Vagrantfile 2015-11-18 17:48:24 -08:00
Mitchell Hashimoto 0e32612324 fix more tests 2015-11-18 17:13:47 -08:00
Mitchell Hashimoto c76e45a75a fix some tests 2015-11-18 17:11:05 -08:00
Mitchell Hashimoto 891c47c742 core: don't do HEAD request for box on non-HTTP [GH-5477] 2015-11-18 16:52:40 -08:00
Seth Vargo 244069d5d7 Merge pull request #6049 from bdwyertech/bdwyertech-patch-2
Chef Zero - Fix 'nodes_path' Support
2015-11-18 16:46:02 -08:00
Mitchell Hashimoto 1a7937ed50 core: don't replace insecure key on base package [GH-5310] 2015-11-18 16:25:07 -08:00
Mitchell Hashimoto da116bffec fix syntax error 2015-11-18 15:57:58 -08:00
Mitchell Hashimoto 85f1e05e2a core: prune machine if non-existent CWD from index [GH-4742] 2015-11-18 15:48:59 -08:00
Mitchell Hashimoto d657804f18 Merge branch 'master' of https://github.com/matthewcodes/vagrant into matthewcodes-master 2015-11-18 15:09:47 -08:00
Seng Lin Shee f1647ddea6 Fixed unit test.
Command is now wrapped in more PowerShell scripts, changing its final encoded value.
2015-11-18 13:53:17 -08:00
Mitchell Hashimoto d3bcc4e5f9 Merge pull request #6213 from jrob/winrm-execution-timeout
Winrm execution timeout
2015-11-18 13:00:59 -08:00
Mitchell Hashimoto e6098f6c4f rename to powershell_elevated_interactive 2015-11-18 12:51:18 -08:00
Mitchell Hashimoto 37940e7350 Merge pull request #6185 from marc-ta/elevated_interactive
Elevated interactive
2015-11-18 12:46:39 -08:00
Mitchell Hashimoto fedc7e21b3 provisioners/salt: deprecate config_dir 2015-11-18 11:56:07 -08:00
Mitchell Hashimoto f1827602f2 Merge pull request #6502 from dmacvicar/fix-dhcp-on-suse
SUSE-flavored systems use STARTMODE and not ONBOOT
2015-11-18 11:05:36 -08:00
Seth Vargo ff95fc5c1e Only append access_token the first time
This fixes GH-6395 by only appending the access_token once. It also fixes a
bug that was never reported. If a user supplied an access_token for a box URL,
Vagrant would silently overwrite it.

After this commit, Vagrant only appends an access_token to the URL if no
value exists at the key.
2015-11-18 10:44:35 -08:00
Duncan Mac-Vicar P a21d5be705 SUSE-flavored systems uses STARTMODE and not ONBOOT
As described in /etc/sysconfig/network/ifcfg.template

Static template was already using the right one, but the dhcp configuration seems
to be copied from a Fedora/Redhat template.
This fixes the issue that the interface does not come up after reboot.
2015-11-08 16:09:04 +01:00
Gilles Cornu a3c077cbe0 Merge branch 'gildegoma/ansible-force-ssh-user'
Resolved conflicts in
  plugins/provisioners/ansible/config.rb
  plugins/provisioners/ansible/provisioner.rb
  test/unit/plugins/provisioners/ansible/provisioner_test.rb
  website/docs/source/v2/provisioning/ansible.html.md

ref #6348
2015-11-08 14:01:23 +01:00
Gilles Cornu 9bfdaf7e75 provisioners/ansible: introduce ansible_local
With this change, the existing host-based Ansible provisioner is
refactored to share a maximum of code with this new guest-based Ansible
provisioner.

At this stage of development, the existing unit tests are intentionally
modified as little as possible, to keep safe the existing funtionalities.

Other issues resolved by this changeset:
 - Display a warning when running from a Windows host [GH-5292]
 - Do not run `ansible-playbook` in verbose mode when the `verbose` option
   is set to an empty string.
2015-11-08 10:42:48 +01:00
Mitchell Hashimoto 69d9bc0fe8 Environment can_install_provider and install_provider 2015-11-05 11:50:10 -08:00
Mitchell Hashimoto 72e13ee9ef test: add tests for provider command 2015-11-04 14:26:22 -08:00
Gilles Cornu dde94a3ce7 provisioners/ansible: add force_remote_user option
The benefits of the following "breaking change" are the following:
- default behaviour naturally fits with most common usage (i.e. always
  connect with Vagrant SSH settings)
- the autogenerated inventory is more consistent by providing both the
  SSH username and private key.
- no longer needed to explain how to override Ansible `remote_user` parameters

Important: With the `force_remote_user` option, people still can fall
back to the former behavior (prior to Vagrant 1.8.0), which means that
Vagrant integration capabilities are still quite open and flexible.
2015-11-02 09:03:15 +01:00
matthewcodes cbb03a02d4 Updating tests to check for single quote 2015-10-28 16:46:43 +00:00
Mitchell Hashimoto 32e981ce7c core: machine-readable output should include standard UI output
As a "ui" type
2015-10-26 18:10:26 -07:00
Dan Dunckel 9d87be51da Small refactor on conditional check and add tests 2015-10-15 12:25:50 -07:00
Seth Vargo c88d52082a Merge pull request #6296 from tomfanning/master
Hyper-V set mac address
2015-10-14 13:02:53 -04:00
Mitchell Hashimoto 5e48d35911 Merge pull request #6229 from mitchellh/b-winrm-info-respect-timeout
communicators/winrm: respect boot_timeout when fetching winrm_info
2015-10-12 15:50:05 -04:00
Mitchell Hashimoto 06f8595bc0 kernel/v2: clone option 2015-10-08 11:59:09 -04:00
Mitchell Hashimoto ec0326f1c8 Merge pull request #6377 from mitchellh/f-cap-command
"cap" command
2015-10-08 10:52:14 -04:00
Mitchell Hashimoto 99d29f17fa commands/cap 2015-10-08 10:35:36 -04:00
Mitchell Hashimoto 31ae00cfc3 test: more tests for snapshots 2015-10-08 09:10:55 -04:00
Mitchell Hashimoto cc8cdafdc3 test: test for IsEnvSet 2015-10-07 22:54:27 -04:00
Mitchell Hashimoto 199a58fdd9 test: test IPv6 2015-10-01 08:47:25 -04:00
Mitchell Hashimoto 7e18a92bd9 test: fix tests 2015-10-01 08:45:44 -04:00
Mitchell Hashimoto ec0b0fb7f9 providers/virtualbox: IPv6 host only networks 2015-09-30 17:23:25 -07:00
Brian Dwyer c23610d703 Update test 2015-09-27 23:24:01 -04:00
tomfanning 41beaac074 Hyper-V set mac address 2015-09-22 11:35:55 +01:00
Sam Phippen 379dcfa568 Add a failing test for #6065 2015-09-12 14:31:49 +01:00
Sam Phippen eeb750cd33 Catch encoding problems with sources provided to Vagrant::Config::Loader#set
Here we implement a naive solution to #5605 which catches the case that
a provided source contains an object which cannot be inspected, because
an object contained within in has an #inspect string that returns a
string that is incompatible with the encoding in
`Encoding.default_external` or a string which cannot be downcast to
7-bit ascii.

The Ruby VM implementation of "#inspect" implements this checking on
these lines of code: http://git.io/vZYNS. A Ruby level override of
this method does not cause this problem. For example:

```ruby
class Foo
  def inspect
    "😍".encode("UTF-16LE")
  end
```

will not cause the problem, because that's a Ruby implementation and the
VM's checks don't occur.

However, if we have an Object which **does** use the VM implementation
of inspect, that contains an object that has an inspect string which
returns non-ascii, we encounter the bug. For example:

```ruby
class Bar
  def inspect
    "😍".encode("UTF-16LE")
  end
end

class Foo
  def initialize
     @bar = Bar.new
  end
end

Foo.new.inspect
```

Will cause the issue.

The solution this patch provides basically catches the encoding error
and inserts a string which attempts to help the user work out which
object was provided without blowing up. Most likely, this was caused
by a user having a weird encoding coming out of one of the sources
passed in, but without a full repro case, it's not clear whether a patch
should be applied to a different object in the system.

Closes #5605.
2015-09-08 17:30:50 +01:00
Sam Phippen 790fa9f8e2 Add a failing test for #5605 2015-09-08 17:15:51 +01:00
Paul Hinze 1e84cc4d6a communicators/winrm: respect boot_timeout when fetching winrm_info
We gained a ton of improvemnts to WinRM error handling in
https://github.com/mitchellh/vagrant/pull/4943, but we also got one bug.

The new code raises an exception when `winrm_info` does not return right
away. This was preventing us from catching the retry/timout logic that's
meant to wait until boot_timeout for the WinRM communicator to be ready.

This restores the proper behavior by rescuing the WinRMNotReady
exception and continuing to retry until the surrounding timeout fires.
2015-09-02 16:36:23 -05:00
Jeremy Roberts 44154c92a9 Fixing WinRM communicator unit test. 2015-08-31 11:42:34 -04:00
konomae ad9a7324c5 Fix invalid ini entry error when ansible_ssh_private_key_file contains spaces 2015-08-29 18:00:20 +09:00
Brian Dwyer 15ec95328a Update test 2015-07-28 13:24:39 -04:00
Gilles Cornu faeb8a9440 core: plugin management requires bundler
With this change, the `Vagrant::plugins_enabled?` is now false when the
embedded Bundler is not available.

Resolve the broken RSpec unit tests after
479323f1e8.
2015-07-10 13:37:33 +02:00
Gilles Cornu 3842a1f710 provisioners/ansible: provide ssh identities via ANSIBLE_SSH_ARGS (when necessary)
When provisioning multiple machines in sequence (the default vagrant
behaviour), it doesn't make sense to require to provide the private ssh
key(s) via the custom ansible inventory script/file.

To align with the handling of multiple ssh keys per machine, we won't
rely any longer on `--private-key` command line argument, but only pass
the keys via `ANSIBLE_SSH_ARGS` environment variable.

Note that when vagrant generates the ansible inventory and that only one
key is associated to a VM, this step would be redundant, and therefore
won't be applied.

This change fixes the breaking change introduced by 3d62a91.
2015-07-10 08:51:17 +02:00