Commit Graph

3182 Commits

Author SHA1 Message Date
Seth Vargo e2fadbcf08
Add a log message when the VM master is missing 2016-05-29 01:19:56 -04:00
Seth Vargo 1e7c8e8d6c
Use LF instead of CRLF 2016-05-29 01:18:24 -04:00
Seth Vargo d3d88f5d91 Merge pull request #7126 from jjulien/iss_6742
Fixed linked clone failure when master VM is missing
2016-05-29 01:14:04 -04:00
Seth Vargo 07389ffc04
Update command help to show id too 2016-05-29 01:06:51 -04:00
Seth Vargo 61adbf77d4 Merge pull request #7287 from KierranM/win-ssh-forward
[#7202] Always forward SSH on Windows
2016-05-29 00:58:18 -04:00
Seth Vargo b11f8cbd1b Merge pull request #7293 from ericpulvino/master
Set max_network_adapters to 36 for Virtualbox
2016-05-29 00:55:44 -04:00
Seth Vargo 982af05178
Add a note about why we will always leak RDP tmpfiles 2016-05-28 23:53:20 -04:00
Seth Vargo f95eb124d5
Use Util::Tempfile in Chef provisioner
This also fixes some Windowsisms
2016-05-28 23:22:35 -04:00
Seth Vargo 5a4f345363
Use Util::Tempfile when configuring networks
This fixes a fairly large tempfile leak. Vagrant uses a template
renderer to write network configuration files locally to disk. Then,
that temporarily file is uploaded to the remote host and moved into
place. Since Vagrant is such a short-lived process, GC never came along
and cleaned up those tempfiles, resulting in many temporary files being
created through regular Vagrant usage.

The Util::Tempfile class uses a block to ensure the temporary file is
deleted when the block finishes. This API required small tweaks to the
usage, but provides more safety to ensure the files are deleted.
2016-05-28 23:22:34 -04:00
Seth Vargo 3d2390fc94
Give a unique, prefixed name to all tempfiles
This commit basically grepped the code base for all uses of Dir.mktmpdir
and Tempfile.new/open and ensures the value is unique within the
code base and also prefixed with `vagrant-`.

Previously, most invocations of these commands simply used "vagrant",
thus making them indistinguishable when trying to identify leaks.
2016-05-28 23:22:34 -04:00
Seth Vargo cee6e6c7bc
Fix file leaking in bundler 2016-05-28 17:01:59 -04:00
Seth Vargo fc8e97cd89
Style 2016-05-27 19:08:49 -04:00
Seth Vargo 01369342db Merge pull request #5670 from agdula/master
add RDP auto login with password
2016-05-27 19:08:10 -04:00
Ray Ruvinskiy e42f346b1d
Make `start` action run provisioners if VM is running
Previously, there was no one gesture that would start a VM if it was not
running and run the appropriate provisioners regardless of its original
state. `vagrant up` did nothing if the VM was running, while
`vagrant provision` did nothing if the VM was not running.

Change the semantics of `vagrant up`, via the start actions of the providers,
to go through the provisioning logic even if the VM is already running.
The semantics of `run: "once"` vs `run: "always"` are respected.

Tested with the VirtualBox provider but not the others.

Resolves #4421
2016-05-27 19:00:33 -04:00
Seth Vargo 68329817ad Merge pull request #7290 from phyber/fix/master/prepare_nfs_settings_machine_ip_fix
prepare_nfs_settings: Try harder to get all machine IPs.
2016-05-27 18:38:03 -04:00
Seth Vargo 8c11b537ba
Allow Mac/Windows users to use Docker native 2016-05-27 17:36:07 -04:00
Seth Vargo db1f98ffd6 Merge pull request #7298 from till/t/docker-for-mac-beta
Change: disable the linux switch (Docker for Mac/Windows, etc.)
2016-05-27 17:25:13 -04:00
Seth Vargo 171434bbf9 Merge pull request #7353 from mitchellh/sethvargo/package_preflight
Move pre-flight package validation to middleware
2016-05-27 17:16:40 -04:00
Seth Vargo f313c89d74 Merge pull request #7059 from markpeek/markpeek-no-provision-on-resume
Do not ignore the sentinal file when running resume
2016-05-27 17:07:41 -04:00
Seth Vargo efdb148f61
Move pre-flight package validation to middleware
This commit separates the scratch and output directory creation from the
main package middleware into its own PackageSetupFolders middleware.
Additionally, the validation that ensures an output file does not exist
is moved into a validation function that can be shared across multiple
methods.

This refactor permits a pre-flight check to ensure box packaging would
be successful before actually stopping the VM.

Fixes GH-7351
2016-05-27 17:07:04 -04:00
Seth Vargo 08550b6888 Merge pull request #7108 from jtopper/fix_hyperv_status_exception
HyperV: Reinstate compatibility with PowerShell 4
2016-05-20 10:46:01 -04:00
Seth Vargo b384ff98a5
Trailing comma 2016-05-19 11:35:53 -04:00
Thom May 693d4dd5f1
Support Chef Solo local + legacy modes
Signed-off-by: Thom May <thom@may.lt>
2016-05-19 15:27:17 +01:00
Jon Topper 0a7c20a93a Determine status behaviour based on PS version 2016-05-13 17:50:24 +01:00
Jon Topper df4caf0757 Add snapshots to Hyper-V driver 2016-05-13 16:58:08 +01:00
David O'Rourke 985f1d4dda prepare_nfs_settings: Fix add_ips_to_env!, spec test passes again. 2016-05-10 11:16:21 +01:00
till 647bd6114c Change: disable the linux switch (Docker for Mac/Windows, etc.) 2016-05-08 21:35:12 +02:00
Eric Pulvino 45e52e3bf1 Updated ./plugins/providers/virtualbox/driver/base.rb file, set max_network_adapters to 36 for Virtualbox so all 36 adapters are cleared prior to programming interfaces. This fix is per issue 7286 --> https://github.com/mitchellh/vagrant/issues/7286 2016-05-08 00:11:22 -04:00
David O'Rourke ed708645b2 prepare_nfs_settings: Try harder to get all machine IPs.
Vagrant was not behaving correctly in configurations where there was
a static IP on a VirtualBox `intnet` interface and a DHCP `:hostonly`
interface configured.

Since `machine_ip` attempted to get static addresses `||` dynamic
addresses, it would simply use the static machine address and
continue.

This commit corrects this behaviour by collecting all static and
dynamic addresses into the `machine_ip` array instead of just one or
the other.

The result of this is a correctly generated `/etc/exports` on the
host machine, allowing NFS mounts to work correctly in this type of
environment.
2016-05-05 14:41:03 +01: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
penz d29acc8982 Do not let NFS systemctl status use a pager
Call it with "--no-pager"
Without it, if the user has a pager (more/less/etc.) configured and
call vagrant up with NFS shares, systemctl would use the pager, and
that would probably require an unnecessary key press from the user.
2016-04-28 13:28:37 -03:00
Gilles Cornu cf908d35e0 provisioners/ansible_local: Run galaxy from `provisioning_path` directory
Since it is now possible to specify some Galaxy settings in an
`ansible.cfg` file, it makes sense to run `ansible-galaxy` from the
same working directory as `ansible-playbook` execution does.

See http://docs.ansible.com/ansible/intro_configuration.html#galaxy-settings
2016-04-24 00:26:59 +02:00
Gilles Cornu b6a3f0e8f1 Merge pull request #7103 from mitchellh/gildegoma/fix-6726
ansible_local: use double quoting for 'extra-vars', 'limit' and 'start-at-task' options (except if defined via `raw_arguments` option)
2016-04-21 00:29:43 +02:00
Gilles Cornu b2286388f0 provisioners/ansible: add basic config validators
With this change, the `raw_arguments` and `raw_ssh_args` options are:
- STILL automatically converted as an Array when they are set a String
  (no behaviour change)
- rejected if they are not of Array data type otherwise

Additional Notes:
- the 'as_array' tiny helper has been removed since it was no longer
  used.
- there is for now no deeper validation (i.e. verifying that the Array
  elements are only *String* objects)
2016-04-20 23:54:19 +02:00
Gilles Cornu ab036ddd0b provisioners/ansible: don't format raw_arguments
With cb80286a4a, the helper function
stringify_ansible_playbook_command was also applied on the
`raw_arguments` content, which is not wanted. Given that users have used
the `raw_arguments` option as a workaround to avoid the bug GH-6726,
this new change ensure that any `--extra-vars` option passed as a raw
argument won't be additonally enquoted by the ansible_local
provisioner.

This change also improves the ansible remote provisioner verbose output,
but has no impact on its behaviour, which was already correct.

Note that this refactoring introduces some code duplications that are not
very elegant (see ansible_playbook_command_for_shell_execution in
host.rb and execute_ansible_playbook_from_host in base.rb). I hope we
can find a better implementation later, but it is good enough for now
since all these parts are covered by corresponding unit tests (the
`ansible_local` stuff being tested via the verbose output of the ansible
remote provisioner).
2016-04-20 23:50:42 +02:00
Seth Vargo 6c01aaf6ab Merge pull request #7090 from mac2000/master
hyperv differencing disk
2016-04-17 23:14:29 +05:30
Seth Vargo 2d0943b0ad Print a warning when token and envvar are set
Fixes GH-7206
2016-04-08 10:16:10 -04:00
Michael Sarahan 72e9f0fe10 move masterless config to apply to all platforms 2016-04-05 10:24:47 -05:00
Darragh Bailey cae0bfdf9d provisioners/ansible: Replace inventory file instead of modify
When updating the inventory, write to a temp file and replace the
original once writing is complete, to allow for an atomic replacement
of the contents.

Ensures that ansible reading an inventory file will get either the old
or new contents, but never the truncated version of the file that
appears should you open it with 'w' mode set to replace the contents.

Solves the 'provided hosts list is empty' error, which is emitted by
ansible should it manage to be reading the inventory file just as it
was truncated, but before the new contents were flushed to disk.

Partially-Fixes: #6526
2016-03-31 17:44:20 +01:00
Seth Vargo 0505771481 Do not return an error if ifdown fails
Ubuntu versions prior to 16.04 always returned a successful exit status,
even if one tried to down an interface that does not exist. This
behavior changed in Ubuntu 16.04 to return an error. This commit
preserves the old behavior.

Fixes GH-7155
2016-03-20 18:21:03 +02:00
Seth Vargo 76e7a980a8 Use a hash for directory lookups 2016-03-17 20:48:08 -05:00
Phivos Stylianides a27e7e106a push via sftp issue when file parent directory does not exist
Overcomes exception Net::SFTP::StatusException (2, "no such file") when using: "vagrant push" via sftp and a file parent directory does not exist. Function "upload" does not create the directory before uploading a file ('mkdir: true' seems to have no effect as zero directories are created while files are uploaded normally).
2016-03-17 20:46:47 -05:00
Seth Vargo 8319f159b6 Use hostname if no node_name is set
Fixes GH-7063
2016-03-17 20:15:11 -05:00
Seth Vargo d565c2f07e Check both stderr and stdout
Different vbox versions print this to different streams, so check both
just to be sure
2016-03-17 10:52:10 -04:00
Seth Vargo 5b336949b5 Merge pull request #7050 from md55/snapshots-in-virtualbox41
Adds snapshot commands in VirtualBox 4.1
2016-03-17 10:48:03 -04:00
John Julien e0ecda961c Fixed linked clone failure when master VM is missing
If the master VM is removed, but the master_id file exists, Vagrant
would still attempt to clone using the master_id rather then
importing re-importing first.

Fixes #6742
2016-03-09 19:33:47 -06:00
Lars Christensen a6565199ff Restart network after reconfiguration
Fixes #7119.
2016-03-08 16:24:24 +01:00
Seth Vargo c6c9942e2e Merge pull request #7104 from altexdim/fix_centos_networks
Fixed centos 7 networks if using more than 3 ethernet adapters.
2016-03-07 11:30:26 -05:00
Altex 9e9909536c fix 2016-03-07 19:25:57 +03:00
Altex e998d6b0f4 Fixed centos 7 networks if using more than 3 ethernet adapters. 2016-03-05 22:25:59 +03:00
Gilles Cornu 47c0833277 ansible_local: use double quotes instead of single quotes
Before this minor change, the '--limit' and '--start-at-task'
ansible-playbook command line arguments were enclosed into single
quotes. Using double quotes adds a bit more flexibility, especially
about the task name referred by `start_at_task` option.

It also aligns with the handling of the '--extra-vars' parameter
(see cb80286).
2016-03-05 17:25:54 +01:00
Gilles Cornu cb80286a4a ansible_local: put json extra-vars in double quotes
Without this change, the JSON string generated from the `extra_vars`
Ruby hash is passed without enclosing quotes and is then not parseable
by the ansible-playbook command when exectuted in a usual shell context.

In this changeset, the ansible (remote) unit test coverage is improved
to cover both usage of `extra_vars` (ansible_local unit tests are still
missing).

Additional Notes:

 - Double quotes are favored to single quotes in order to allow usage of
   any character for the variable values. For this reason additional
   escaping is appended to JSON-inner double quotes and backslashes.

 - This problem was not affecting the `ansible` remote provisioner
   (which is running the ansible-playbook command via the childprocess
   Ruby library). But with this change, the `verbose` output will also
   now be correct for a copy-paste reuse.

 - After this change, all the "--extra-vars" arguments (also a var
   file passed with the @-syntax or anything coming via the
   `raw_arguments` option) are "blindly" and systematically enclosed
   in double quoted and double-escaped.
   This is not optimal and can potentially break with peculiar values
   (e.g. a double quote character (") cannot be used in a json value
   when using `raw_arguments`). That said, I think that the current
   solution is a reasonable trade-off, since the official `extra_vars`
   option should now be able to cover a great majority of use cases.

Fix #6726
2016-03-05 17:24:28 +01:00
Matt Wrock 508492faae fixes #7098 only specifying Hyper-V generation if the parameter is supported 2016-03-04 23:42:17 -08:00
Paul Hinze 32519b226c Merge pull request #6879 from jtopper/allow_no_delete_snapshot_on_pop
Add missing features to snapshot restore/pop
2016-03-04 11:40:54 -06:00
Jon Topper a7008ef5ec Fix up style nit. 2016-03-04 17:35:54 +00:00
Andres Montalban 492ba40fd1 [MOD] Change the way FreeBSD network interfaces are configured. Fixes #5852 2016-03-01 19:28:09 -03:00
Marchenko Alexandr 51d7c98d49 hyperv differencing disk 2016-03-01 17:23:38 +02:00
Seth Vargo fbd765acc1 Do not interpolate in SMB linux heredoc
Fixes GH-6906
2016-02-29 07:19:45 -05:00
Kamjar Gerami fc6bc723f7 #7074 - fixes does not allow provisioning when container name is specifed - since recent versions of Docker stores it's full container ID we no longer need to use the short version 2016-02-28 13:00:35 +01:00
Kamjar Gerami 6754f8db14 #7084 - fixes-7084-notrunc-command-is-wrong-in-client.rb : corrected the -notrunc command to --no-trunc 2016-02-27 02:16:46 +01:00
Donald Guy 52c95ce291 Correctly detect chefdk install 2016-02-25 19:42:58 -05:00
Mark Peek 563ce33738 Do not ignore the sentinal file when running resume
The sentinal file was always being ignored when running the
resume command. This is fixed along with allowing provision
options to be used with resume. Fixes #6787
2016-02-19 18:24:48 -08:00
Evgeniy N 890820eaf6 Add snapshot commands
Fixed error remains in other versions:
  return [] if e.extra_data[:stdout].include?("does not have")
should be
  return [] if e.extra_data[:stderr].include?("does not have")

Many methods are the same in different version_X, and should be moved to Base class.
2016-02-18 11:47:07 +06:00
Kevin Blair 026243c88b Typo
Changed message to match HyperV terminology
2016-02-16 14:58:42 +00:00
Kevin Blair 343a43cae6 Preserve Disk Image Name
detect and preserve the original name of the disk image rather than forcing it to be disk
2016-02-16 14:57:53 +00: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
Andrew Coleman 95ab29b3db only use controlmaster for non-windows platforms, resolves #6702 2016-02-10 22:44:54 -05:00
Seth Vargo 8c68c6ec70 Use "stable" as the default Chef channel
Previously the default channel was "current", but after discussion with
@coderanger on GH-6979, it seems like this was a poor design decision.
Instead, we should use the stable channel and allow users to opt-in to
prerelease versions.

Fixes GH-6979
2016-02-08 10:49:48 -05:00
Dennis dd541b93b9 ooops missed something while branching 2016-02-04 17:22:28 +01:00
Dennis 833f2d0ef7 added tinycore nfs mount cap 2016-02-04 16:27:53 +01:00
Dennis 25b913e1c1 added tinycore nfs mount cap 2016-02-04 16:26:37 +01:00
Dennis a7bdfd682e added tinycore nfs mount cap 2016-02-04 16:21:07 +01:00
Dennis c4776e4e1d added tinycore nfs mount cap 2016-02-04 16:19:53 +01:00
Seth Vargo a38dba0d4f Merge pull request #6610 from jharshman/vagrant-6608
Vagrant Issue #6608
2016-02-03 10:14:35 -05:00
Seth Vargo fe49c05ed0 Merge pull request #6843 from velocity303/trisquel_6842
Add trisquel guest plugin as derivative of ubuntu - Issue #6842
2016-02-03 10:12:24 -05:00
Seth Vargo 792ee8fb2d Merge pull request #6805 from gimler/double_sudo_fix
remove double sudo
2016-02-03 10:10:35 -05:00
Seth Vargo 6b713bbb41 Merge pull request #6602 from mitchellh/sethvargo/darwin_rdp_info
Add extra_args cap for darwin rdp
2016-02-03 10:08:18 -05:00
Seth Vargo 2ce3c84305 Merge pull request #6749 from mwrock/hist
use SafeExec to capture history via up/down keys in powershell command
2016-02-03 10:05:57 -05:00
Seth Vargo 4b4f1fc24c Add extra_args cap for darwin rdp
This commit fixes GH-5523.
2016-02-03 10:03:57 -05:00
Seth Vargo e7ff8df256 Merge pull request #6867 from jlduran/freebsd-hostname-string
FreeBSD: Use quotes around hostname in rc.conf
2016-02-03 09:59:11 -05:00
Seth Vargo 202692f940 Merge pull request #6909 from willonymous/regex_up
Fix `vagrant up --install-provider` regular expression handling
2016-02-03 09:56:19 -05:00
Seth Vargo b5a6c6e6ab Fix whitespace 2016-02-03 09:55:10 -05:00
Seth Vargo 803ccfa7ae Merge pull request #6899 from tompscanlan/fix_proxy_login
fix login behind proxy (#6898)
2016-02-03 09:54:49 -05:00
Seth Vargo 3b252d37eb Merge pull request #6922 from mwrock/negotiate
upgrade to latest winrm and winrm-fs versions
2016-02-03 09:52:48 -05:00
Seth Vargo 9a93930fa9 Merge pull request #6760 from petems/patch-1
Change to use pkgng
2016-02-03 09:50:19 -05:00
Seth Vargo 2ec42ddc88 Merge pull request #6912 from gavioto/patch-1
Fixed an issue locating puppet binary. Issue-6876
2016-02-03 09:45:22 -05:00
Matt Wrock f912a81362 powershell and cmd calls should use commnand_executor to reuse oprn winrm shell 2016-01-27 11:59:10 -08:00
Matt Wrock d3819d40bf pass winrm debug logging to vagrant logger 2016-01-27 11:59:10 -08:00
Matt Wrock 7ef4ae9e10 use NTLM/Negotiate authentication over basic authentication 2016-01-27 11:57:41 -08:00
Shawn Neal b3925486bd Merge pull request #6923 from mwrock/nori
remove call to deprecated toggle_nori_type_casting in winrm
2016-01-27 11:52:01 -08:00
Seth Vargo a524fc83ae Merge pull request #6806 from gimler/chef_suse
add chef installer for suse
2016-01-25 13:55:24 -05:00
Seth Vargo 1166800b65 Use SSL and HTTPS links where appropriate 2016-01-25 13:14:54 -05:00
Matt Wrock 9fc431f776 remove call to deprecated toggle_nori_type_casting in winrm 2016-01-24 10:54:09 -08:00
gavioto20 d2e8086181 Fixed an issue locating puppet binary. Issue-6876 2016-01-21 20:14:43 +01:00
William Oldwin 5791cd5185 Fix `vagrant up --install-provider` regular expression handling
Fixes GH-6908
2016-01-21 15:23:55 +00:00
Tom Scanlan 661b6a4813 fix login behind proxy (#6898)
we're using rest_client 1.6.9, which doesn't use proxy passed in
to the RestClient::Request.execute.  Must set RestClient.proxy
instead
2016-01-20 16:15:50 -05:00
Gilles Cornu 4e451c6e99 provisioners/ansible_local: fix #6763
Before this change, the detection of a non-existing path on the guest
machine was considered as an error and lead to interrupt the current vagrant
action. This was actually a mistake to do so, since the config checks
are performed before many other vagrant actions than `provision`.
The config.validate phase is also intended to primarily check the options
sanity, but it cannot be too strict with the guest state (which can easily
get "out of automatic control").

With this change, we still apply these checks (when possible), but only warn
about possible configuration problems. This way, the subsequent
statements will happen anyway (e.g. ansible commands will be
executed, vagrant machine will be destroyed, etc.)
2016-01-17 11:27:23 +01:00
Jon Topper eff2b2d7b4 Support provisioning flags on snapshot rollback 2016-01-16 16:07:57 +00:00
Jon Topper 7ba398ead8 Add --no-delete to 'snapshot pop' command
In our test environments, it's good to be able to roll back to the same,
anonymous, snapshot repeatedly.  This patch adds a `--no-delete` option
to the `snapshot pop` command allowing this.

This makes the new core snapshot behaviour more consistent with what we
were doing with vagrant-multiprovider-snap
(https://github.com/scalefactory/vagrant-multiprovider-snap)
2016-01-15 18:21:47 +00:00
Gilles Cornu c2c1a443fd Merge commit 'refs/pull/upstream/6869' into gildegoma/ansible-bug-fixes
Fix #6793
2016-01-14 00:05:33 +01:00
Daniel Schreiber 9dbdb9397a fixing incorrect missing ansible error
At least for ansible 2.0.0.1 the command `ansible-galaxy --help` is inappropriate for testing if ansible is installed, as it yields an error:

```
vagrant@vagrant-ubuntu-trusty-64:~$ ansible-galaxy --help && echo "OK"          
Usage: ansible-galaxy [delete|import|info|init|install|list|login|remove|search|setup] [--help] [options] ...

Options:
  -h, --help     show this help message and exit
  -v, --verbose  verbose mode (-vvv for more, -vvvv to enable connection
                 debugging)
  --version      show program's version number and exit
ERROR! Missing required action
```
2016-01-13 23:05:39 +01:00
Jose Luis Duran 0844b49c7a FreeBSD: Use quotes around hostname in rc.conf
Use double quotes around the hostname value in /etc/rc.conf
2016-01-13 07:28:42 -02:00
James Jones 6c861065de add trisquel guest plugin as derivative of ubuntu - Issue #6842 2016-01-10 08:21:16 -06:00
Andreas Reischuck 5647de8ba4 Add shell quotes to the reported rsync command line to make it readable. 2016-01-09 22:27:54 +01:00
Shawn Neal e1a0b01e27 Fix issue 6762
Fixes error "The term '$?' is not recognized as the name of a cmdlet, function, script"
2016-01-06 13:37:28 -08:00
Gordon Franke d384478c06 add chef installer for suse 2016-01-05 15:31:28 +01:00
Gordon Franke 077f9142f7 remove double sudo 2016-01-05 15:23:22 +01:00
Gilles Cornu 1e38be237e provisioners/ansible: fix galaxy paths on Windows
Close #6757 and update previous fix for #6740 (#6741).

See also these places where the same regexp is used to address similar
"Windows cases":

 - ec85548bd6/plugins/provisioners/chef/provisioner/chef_solo.rb (L99-L103)
 - ec85548bd6/plugins/guests/windows/cap/rsync.rb (L6-L9)
2016-01-05 08:22:10 +01:00
Peter Souter b3dd933afd Change to use pkgng
Old pkg_* is now EOL: https://lists.freebsd.org/pipermail/freebsd-ports-announce/2014-February/000077.html
2015-12-29 14:35:49 +00:00
Matt Wrock 714e79d792 use SafeExec to capture history keys in powershell command 2015-12-27 13:06:45 -08:00
char16t 07f3d0b00d Fix #6740: Ansible local provisioner: remove windows drive letter from path 2015-12-27 12:01:45 +03:00
Mitchell Hashimoto 72f60aff65 whitespace 2015-12-24 12:44:58 -08:00
Mitchell Hashimoto 45212a9b67 core: avoid crash case with nil [GH-6730] 2015-12-24 12:38:14 -08:00
Mitchell Hashimoto 2d67b9ea3f commands/up: take into account forced provider 2015-12-24 12:27:38 -08:00
Mitchell Hashimoto 12b81600fb commands/up: check machine index for provider 2015-12-24 12:24:47 -08:00
Mitchell Hashimoto 05c2d439ac hosts/*: fix virtualbox install exception [GH-6713] 2015-12-24 12:08:31 -08:00
KaffeJunky123 1cdd664918 Update docker_install.rb
Docker provisioning fails on Debian Jessie without the apt-transport-https package installed.
2015-12-23 16:45:20 +01:00
Seth Vargo 9de5126143 Convert env values to strings before escaping 2015-12-22 14:23:56 -05:00
Seth Vargo f780c96a90 Convert Chef Version to a string before comparison
Fixes GH-6709
2015-12-22 11:54:41 -05:00
Tony Arkles 795a7a3d23 Fix for problem where the host_info.ps1 script returns a string instead of a list of IPs 2015-12-17 14:40:50 -06:00
Mitchell Hashimoto 811f21938a Merge pull request #6675 from michaa76/master
#6674 CFEngine Provisioner Broken on Debian (http > https)
2015-12-16 10:46:21 -08:00
michaa76 37d7239803 #6674 CFEngine Provisioner Broken on Debian (http > https) 2015-12-16 14:25:23 +01:00
Gilles Cornu ddbd2a4cfc provisioners/ansible: prefer ssh '-i' argument
In cd93721, I relied on a suprising combination of quotes to protect ssh
execution to strip the quoted path to the private key file.
Since any ssh command line argument can be passed via
`ANSIBLE_SSH_ARGS`, it is quite more readable and easy to rely on the
`-i` argument, which is not affected like `-o IdentityFile=...` and also
supports multiple occurences.

See also http://sourceforge.net/p/fuse/mailman/message/30498048/

Finally fix #6671

Note that I decided to not squash both commits for better
documentation and traceability.
2015-12-16 10:29:13 +01:00
Gilles Cornu cd93721f8f provisioners/ansible: use quotes for the IdentityFile OpenSSH command line arguments
Surprisingly (to me at least), a simple quote enclosure was not enough
to fix the problem.

Caveat: the stringified ansible-playbook command logged in verbose mode
is wrongly formatted (no quotes are escaped).

Fix #6671
2015-12-16 09:54:53 +01:00
Mitchell Hashimoto 06a1461081 Merge pull request #6662 from lukebakken/fixes/lrb/gh-4503-hyper-v-admin-privs
Fix for 4503
2015-12-14 15:56:55 -08:00
Mitchell Hashimoto 739d29e8fa Merge pull request #6612 from reedloden/virtualbox-checksum
Add checksum validation for the VirtualBox installs on Windows and OS X
2015-12-14 15:39:46 -08:00
Mitchell Hashimoto d47c7c74d7 Merge pull request #6659 from swiftstack/change_ipv6_adapter_address
Use <prefix>::1 as the IPv6 adapter IP.
2015-12-14 15:37:28 -08:00
Luke Bakken 57187c9f88 Add method to detect if a Windows user is a member of the "Hyper-V Administrators" group.
Modify Hyper-V provider to require a user to either be an Administrator or a member of "Hyper-V Administrators"
2015-12-10 07:04:39 -08:00
Hasyimi Bahrudin 77031a79b7 pushes/local-exec: add args config 2015-12-10 17:00:35 +08:00
Timur Alperovich a56e118b16 Use <prefix>::1 as the IPv6 adapter IP.
Set the IPv6 adapter IP to be <prefix>::1. Otherwise, guest to host
communication over IPv6 is not routed correctly. This means that
consumers should not specify <prefix>::1 IP addresses to VirtualBox,
which should be a reasonable restriction.

Fixes #6658
2015-12-09 17:22:02 -08:00
Gilles Cornu 25ff027b08 provisioners/ansible_local: use the inventory directory
Like in the (remote) `ansible` provisioner, it is preferred to pass the
directory that contains the generated inventory file. This way, advanced
inventory usages can be achieved by adding more inventory files into the
same directory.

Related to #2103 and #6500

[ci skip]
2015-12-08 23:02:58 +01:00
Seth Vargo aca1e041f6 Rename network to interface 2015-12-08 11:05:39 -05:00
Seth Vargo 9ba8cfcd50 Separate logic into other functions for readability 2015-12-08 10:52:54 -05:00
Timur Alperovich bcf61d001b Only consider the VM interfaces in the IPv6 fixup.
Vagrant should only consider the host-only interfaces used by the
virtual machine in the IPv6 fixup code. There may be other interfaces
present on the system with IPv6 addresses that for various reasons
would fail the routing check (for example, an interface with no
machines attached).

The patch changes the behavior to not scan all of the host-only
interfaces and adds a unit test for the behavior (that the correct IP
is validated).

Lastly, there is a small fix here that may not be an issue for most
people where the IPv6 prefix was asummed to be a multiple of 16 for
the purposes of constructing the UDP probe datagram. This assumption
has been removed.

Fixes #6586
2015-12-08 10:44:07 -05:00
Gilles Cornu a8d0c225c6 Merge pull request #6649 from rickard-von-essen:issue-6636
Close #6636

Note that there is no CHANGELOG entry for this bug fix, since the
`ansible_local` provisioner [#2103] has not been released yet.
2015-12-07 22:41:06 +01:00
Gilles Cornu a0980aa8be provisioners/ansible: minor code formatting change
[ci skip]
2015-12-07 22:30:13 +01:00
Gilles Cornu 850716b220 provisioners/ansible: remove erroneous comment
[ci skip]
2015-12-07 22:28:23 +01:00
Rickard von Essen 9f3ebef810 Support ansible install on RedHat derivates and Fedora.
Fixes #6636
2015-12-07 15:44:20 +01:00
Michael Kuzmin 546649fb9e Fix `uninitialized constant` error in `vagrant powershell` command 2015-12-05 17:24:58 +03:00
Kamjar Gerami b7e9437a77
#3539 - Fixed syntax, language and logic according to comments made by reviewer in PR #6639 2015-12-04 10:05:07 +01:00
Kamjar Gerami 5cbbbb5e28 #3539 - Can't use alphanumeric patterns for box names in ansible.groups: Changed iteration logic for warning message and fixed regex typo 2015-12-04 01:29:22 +01:00
Kamjar Gerami 934bcf9419 #3539 - Can't use alphanumeric patterns for box names in ansible.groups: Host Range Pattern Regex, notification and updates to provisioning web source 2015-12-04 01:13:59 +01:00
Gilles Cornu dde7f4697f Merge branch 'gildegoma/review-6626'
Related to #6619, #6626 and #6627
2015-12-03 21:52:34 +01:00
Gilles Cornu 4c137a9b6b provisioners/ansible: fix comment indentation
[ci skip]
2015-12-03 09:36:57 +01:00
Gilles Cornu 9867281971 provisioners/ansible: allow symbol in `groups` key
After c49a146467, it makes even more sense
to support Symbol datatypes in `groups` option handling.
2015-12-03 09:34:53 +01:00
Mitchell Hashimoto 350da6e1d5 commands/ssh_config: output machine readable output 2015-12-02 17:53:08 -08:00
Gilles Cornu c49a146467 provisioners/ansible(both): alias String-to-Symbol
String and Symbol types are different when used as a Hash key. By
default the Vagrant machine names are set in Symbol format, but users
may write their `host_vars` entries with String keys. This is a very
simple way to ensure smooth experience, without having to coerce the
data types during the config validation (e.g. with a library like
Hashie, which is currently not in the Vagrant dependencies)

See also:
- https://bugs.ruby-lang.org/issues/5964#note-17
- https://github.com/intridea/hashie#keyconversion
2015-12-02 08:37:41 +01:00
Christian Henz 77b11a989c Implemented host_vars option. 2015-12-01 18:56:28 +01:00
Christian Henz dd4ae1a51c Parse and insert group variables into the generated inventory. 2015-12-01 18:56:28 +01:00
Reed Loden 7d81728e45 Add checksum validation for the VirtualBox installs on Windows and OS X
Use Vagrant::Util::FileChecksum to validate the downloaded VirtualBox
installers.

SHA-256 checksums for VirtualBox files are available at
https://www.virtualbox.org/download/hashes/5.0.10/SHA256SUMS.

Fixes #6611.
2015-11-28 00:04:41 -08:00
Joshua Harshman 652b4dac55 Vagrant Issue #6608
Refactor and repair regular expression attempting to match present interfaces.
The refactored regular expression will match on enp* ens* eth* variants.
2015-11-27 13:13:44 -08:00
Romulo De Lazzari a9e1ef4fe3 update help message on --provision-with to add by provisioner name 2015-11-26 15:17:09 +00:00
Gilles Cornu eaf918ec35 Merge branch 'gildegoma/5086-ansible-winrm' into master 2015-11-25 22:46:08 +01:00
Seth Vargo 050f8d4d71 Allow specifying the guest port search 2015-11-24 16:33:09 -05:00
Seth Vargo 4cebe283e8 Remove debug/todo comments 2015-11-24 16:33:09 -05:00
Seth Vargo f20c08f57f Return nil if the VM is not running when looking at forwarded ports 2015-11-24 16:33:09 -05:00
Seth Vargo beb84d3212 Move to I18n 2015-11-24 16:33:09 -05:00
Seth Vargo 958ce8983b Remove todo comment 2015-11-24 16:33:08 -05:00
Seth Vargo 063f60e593 Add `vagrant port` command 2015-11-24 16:33:08 -05:00
Mitchell Hashimoto 7a1d17042d install VB 5.0.10 2015-11-23 22:54:31 -08:00
Seth Vargo bd48d24825 Respect proxy envvars for login command 2015-11-23 20:19:45 -05:00
Seth Vargo 930e166b47 Add :env option to shell provisioner 2015-11-23 19:29:35 -05:00
Seth Vargo 8c3f833e8e Use the new presence helpers in the Chef provisioner 2015-11-23 18:33:47 -05:00
Seth Vargo 844cca9013 Skip nil IP addresses in ipv6 fix
Fixes GH-6558
2015-11-23 17:20:20 -05:00
Seth Vargo de1bd061f1 Merge pull request #6582 from LalatenduMohanty/fedora-guest-detection
Making the Fedora guest detection search string generic
2015-11-23 17:04:03 -05:00
Seth Vargo 7b89ecc230 Add public_address cap for VirtualBox
Fixes GH-5978
2015-11-23 16:23:22 -05:00
Lalatendu Mohanty 7bb57c6f83 Making the Fedora guest detection search string generic
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
2015-11-24 01:36:17 +05:30
Mitchell Hashimoto 24799575c3 providers/hyperv: fix error 2015-11-23 12:06:11 -08:00
Mitchell Hashimoto b23b48a614 providers/hyper-v: support more than one NIC [GH-4346] 2015-11-23 12:05:37 -08:00
Mitchell Hashimoto 55e872eda4 Merge pull request #6118 from mjaverto/patch-1
Fix Win 10 Enterprise Vagrant Error
2015-11-23 11:45:23 -08:00
Mitchell Hashimoto 601f7d41e5 synced_folders/smb: use cred files [GH-4230] 2015-11-23 11:11:50 -08:00
Mitchell Hashimoto dbf419abad providers/virtualbox: ignore unknown status interfaces [GH-6061] 2015-11-23 10:15:32 -08:00
Shawn Neal c1acbec55e Merge pull request #6581 from mitchellh/gildegoma/fix-winrm-ssl-portforwarding-overrides
"Split" the handling of WinRM port forwarding rules (plaintext, ssl)
2015-11-23 10:13:23 -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
Mikhail Zholobov 4e4029a076 Fix permissions on "~/.ssh/authorized_keys" 2015-11-22 19:24:33 +02:00
Gilles Cornu ee55379736 provisioner/ansible: support winrm connection mode
This is a first cut to resolve #5086.
2015-11-21 05:34:50 +01:00
Gilles Cornu 2789ce61e0 Merge branch 'gildegoma/2718-ansible-galaxy' into master 2015-11-21 05:21:41 +01:00
Mitchell Hashimoto 3c2fab9d0d providers/virtualbox: more robust lookup for VBoxManage on Win 2015-11-20 15:56:14 -08:00
Mitchell Hashimoto 45a8a5907f synced_folders/rsync: SSH control for faster rsync 2015-11-20 10:48:59 -08:00
Mitchell Hashimoto 32f6accb25 commands/box: don't halt on metadata download failure [GH-6453] 2015-11-19 18:50:50 -08:00
Seth Vargo 1b08cfcd09 Do not fail if uninstalling lxc/docker-io fails 2015-11-19 18:37:57 -08:00
Seth Vargo bad4c2103d Only install Docker if it is not already installed 2015-11-19 18:37:57 -08:00
Seth Vargo f5a0c3ed5b Deprecate docker.version 2015-11-19 18:37:57 -08:00
Jason Casden 7076d192c9 Quiet package commands 2015-11-19 18:37:57 -08:00
Jason Casden d2983d4fe4 Use official Docker installer and upgrade for :latest installs 2015-11-19 18:37:57 -08:00
Mitchell Hashimoto f5cadc93fa guests/linux: POSIX sed [GH-6104] 2015-11-19 18:35:18 -08:00
Seth Vargo 40336016e1 Use the correct option for sending the environment 2015-11-19 18:08:47 -08:00
Seth Vargo 20940d1a2f Use subprocess as a poor-man's exec for local-exec
Fixes GH-5307
2015-11-19 17:03:39 -08:00
Seth Vargo 02a351841e Use an array instead of map 2015-11-19 16:32:43 -08: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
Seth Vargo ec85548bd6 Support arrays for data_bags_path
Fixes GH-5988
2015-11-19 16:17:42 -08:00
Mitchell Hashimoto 1ccd91aada Merge pull request #4473 from rtkrruvinskiy/https_metadata
Add HTTPS download options to `box update` and `box outdated`
2015-11-19 16:16:48 -08:00
Seth Vargo 1fd9aec493 Only append folder suffixes if we are sharing host folder paths
Fixes GH-6472
2015-11-19 16:08:32 -08:00
Seth Vargo 76f3dce5db Remove deprecated options 2015-11-19 15:52:27 -08:00
Seth Vargo df207d2637 Require nodes_path for Chef Zero provisioning
Fixes GH-6110
2015-11-19 15:52:26 -08:00
Gilles Cornu 2384032446 provisioners/ansible: freeze a constant value
Kudos @sethvargo :)

[skip ci]
2015-11-20 00:21:41 +01:00
Gilles Cornu 6dbc74d814 provisioners/ansible: fix code indentation 2015-11-20 00:13:01 +01:00
Gilles Cornu c9fe02cea5 provisioners/ansible_local: remove repetitions 2015-11-20 00:11:44 +01:00
Gilles Cornu 74eb3109cf provisioners/ansible_local: fix a lame bug
I missed to rename the refactored exceptions as AnsibleCommandFailed in
the guest-based parts. The lack of unit tests for these parts hurts...
on my agenda, I swear!
See c1f3d114f5
2015-11-20 00:07:34 +01:00
Seth Vargo c30467a6f9 Allow Chef to install on Windows 2015-11-19 15:01:09 -08:00
Seth Vargo a90e6cfe4c Use the new Chef installation channel and options
This deprecates "prerelease", which will be removed in the next release.
2015-11-19 14:57:01 -08:00
Seth Vargo 43ef927628 Latest will have the formatter option 2015-11-19 14:56:18 -08:00
Seth Vargo 2dbd24129f Remove deprecated method 2015-11-19 14:56:03 -08:00
Seth Vargo 609ff9f7b2 Allow provisioner cleanup task to exit on failure 2015-11-19 14:55:46 -08:00
Gilles Cornu 5659c3f2a0 provisioners/ansible: apply @sethvargo comments
Follow-up of code review of PR #6529
2015-11-19 23:42:01 +01:00
Seth Vargo b8f200a4c1 Only force the formatter if we are on Chef 11 or higher
Fixes GH-6278
2015-11-19 11:48:04 -08:00
Seth Vargo c0a58fe5bd Merge pull request #6555 from mitchellh/sethvargo/chef_delete
Automatically generate a node_name for Chef
2015-11-19 11:41:31 -08:00
Mitchell Hashimoto 4988298b0b guests/arch: configure networks should enable device [GH-5737] 2015-11-19 11:39:04 -08:00
Seth Vargo 9559fc549c Automatically generate a node_name for Chef
This is required because the Chef Server almost always needs a node name to
interact. This will default to the hostname, but that's always going to be
`vagrant.vm`, which will collide easily.

This generates a random hostname with `vagrant-` as the prefix and stores the
result in the machine's data directory.
2015-11-19 11:38:33 -08:00
Mitchell Hashimoto 97021ceedd Merge pull request #6554 from mitchellh/b-heroku-branch
push/heroku: use correct current branch [GH-6123]
2015-11-19 11:22:06 -08:00
Mitchell Hashimoto 270c0726df Merge pull request #6552 from mitchellh/f-cache-vbox
providers/virtualbox: cache VirtualBox version [GH-6468]
2015-11-19 11:20:09 -08:00
Mitchell Hashimoto a75b14b769 providers/virtualbox: wrap version set in mutex 2015-11-19 11:19:56 -08:00
Mitchell Hashimoto f5273c5409 push/heroku: use correct current branch [GH-6123] 2015-11-19 11:17:48 -08:00
Seth Vargo 825bd6d5ef Run provisioner cleanup tasks before destroying the VM 2015-11-19 11:14:31 -08:00
Mitchell Hashimoto fb511a43d9 providers/virtualbox: store version on instance as well 2015-11-19 11:02:00 -08:00
Mitchell Hashimoto d56c8fda18 providers/virtualbox: cache VirtualBox version [GH-6468] 2015-11-19 11:00:02 -08:00
Seth Miller c8a18fda26 Fixing the Salt bootstrap script for Windows
The URL for the download has changed as per issue #6274
2015-11-18 21:55:32 -06:00
Seth Vargo f999218c53 Perform Chef delete operations on the guest instead of the host 2015-11-18 18:28:42 -08:00
Mitchell Hashimoto eb5a6fc7c3 communicators/ssh: more nil guards [GH-6225] 2015-11-18 17:32:40 -08:00
Mitchell Hashimoto 6f3ed13f75 providers/virtualbox: run provisioners on suspend resume 2015-11-18 17:16:23 -08:00
Mitchell Hashimoto 925d7c5bf6 Revert "Make DHCP IP configurable"
This reverts commit 004fe0e7bb.
2015-11-18 17:11:58 -08:00
Seth Vargo a1a3824e35 Do not throw an error when the Chef node_name is nil 2015-11-18 16:56:31 -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
Seth Vargo 96a815e84e Merge pull request #6538 from mitchellh/sethvargo/pr-6325
Make DHCP IP configurable
2015-11-18 16:41:30 -08:00
Seth Vargo e9f4bca380 Revert "#5186: Warning: Authentication failure. Retrying... after packaging box" 2015-11-18 16:35:35 -08:00
Seth Vargo 48df85008c Rebase and cleanup conditional 2015-11-18 16:31:44 -08:00
Tristan Rivoallan 2c6ef938c7 Fix failing network test 2015-11-18 16:29:46 -08:00
Tristan Rivoallan 004fe0e7bb Make DHCP IP configurable
This makes it possible to have DHCP attribute IPs to guests under
various subnets
2015-11-18 16:29:46 -08:00
Seth Vargo ecf6087a90 Merge pull request #6537 from mitchellh/sethvargo/emit_upstart
Fix upstart detection and event emit
2015-11-18 16:26:06 -08:00
Seth Vargo 42d0c3637c Merge pull request #6406 from markus-perl/5186
#5186: Warning: Authentication failure. Retrying... after packaging box
2015-11-18 16:23:44 -08:00
Seth Vargo 82f620ed13 Fix upstart detection and event emit 2015-11-18 16:18:32 -08:00
Seth Vargo f95b7914f7 Merge pull request #6515 from oliviermeurice/slack_net_conf
Slack net conf
2015-11-18 16:04:17 -08:00
Seth Vargo 1f6e5aa081 Check if the network manager is before reloading 2015-11-18 15:55:11 -08:00
Seth Vargo c743d88ad6 Fix bad options 2015-11-18 15:26:45 -08:00
Mitchell Hashimoto d425193e42 Merge pull request #6493 from Ingramz/master
Re-enable UNC paths for shared folders on Windows hosts
2015-11-18 15:20:21 -08:00
Mitchell Hashimoto c43e0af4d7 Merge pull request #6382 from sophicware/fix/salt-provisioner-install-args
[salt] [bugfix] Restablize Salt provisioner
2015-11-18 15:19:02 -08:00
Mitchell Hashimoto 394f66468d Merge pull request #6489 from invernizzi/master
Update docker installer to work on custom kernels
2015-11-18 15:16:32 -08:00
Mitchell Hashimoto c754c0bf34 Merge pull request #6488 from dvorak/rescue-enetunreach
Add Errno::ENETUNREACH to SSH rescue
2015-11-18 15:13:59 -08:00
Mitchell Hashimoto 9e1a119a4b Merge pull request #6475 from nikelmwann/linux-host-use-xfreerdp
Prefer xfreerdp for RDP connections on Linux hosts.
2015-11-18 15:12:47 -08:00
Mitchell Hashimoto fbdb6c0d19 Merge pull request #6474 from aneeshusa/enable-salt-options-for-masterless
Enable log_level and colorize for salt masterless
2015-11-18 15:11:54 -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
Mitchell Hashimoto f5f596ab8b Merge pull request #6389 from grafjo/fix_6151
Fix for #6151 / provisioner puppet_server with Puppet Collection 1
2015-11-18 14:59:58 -08:00
Mitchell Hashimoto d69d7047b2 Merge pull request #6386 from legal90/fix-osx-nic-order
Fix network configuration in OS X (Darwin) guests
2015-11-18 14:33:51 -08:00
Mitchell Hashimoto d89bd56d27 Merge pull request #6373 from caleblloyd/patch-1
Hyper-V: select boot device by VM generation
2015-11-18 14:16:54 -08:00
Seth Vargo 72d62e3d2e Merge pull request #6404 from timotei/patch-1
Remove back tick in puppet facts definitions #6403 (Fix vagrant 1.7.3+ with puppet)
2015-11-18 14:02:48 -08:00
Mitchell Hashimoto fe36131549 Merge pull request #6367 from knixeur/fix-host-slackware
Fix Slackware Host detection and nfsd checks
2015-11-18 14:02:06 -08:00
Seth Vargo d680811d01 Merge pull request #6364 from ctammes/patch-1
Update push.rb
2015-11-18 14:01:16 -08:00
Seng Lin Shee 774940521e Ignore Powershell progress updates on stderr
Starting with PowerShell 5, the progress bar can be observed via the
Write-Progress cmdlet. From WinRM, this appears as a stderr output.
Vagrant assumes that there is error if output appears on stderr.

This terminates various scripts which previously executed successfully
in Vagrant (prior to Windows 10).

This fix injects a variable assignment at various points of the script
execution process to disable display of the progress bar.
2015-11-18 13:52:25 -08:00
Mitchell Hashimoto 90b850aa49 Merge pull request #6307 from tbriggs-curse/fix/master/6306_chef_windows_capability
Fix/master/6306 chef windows capability
2015-11-18 13:48:48 -08:00
Mitchell Hashimoto a31f505731 Merge pull request #6288 from rickard-von-essen/dnf
Use dnf on Fedora guests instead of yum if available.
2015-11-18 13:37:22 -08:00
Mitchell Hashimoto c200190c5b Merge pull request #6259 from philipwigg/5943-fix-puppet-verify-binary
Fix verify_binary for Puppet for Windows guests.
2015-11-18 13:15:34 -08:00
Mitchell Hashimoto f8b243a810 Merge pull request #6254 from krig/suse-nfs-commands
Updated NFS commands for SUSE, add sudoers script for SUSE, fix sudoers scripts for Linux
2015-11-18 13:14:52 -08:00
Mitchell Hashimoto fbe10cf7f6 Merge pull request #6232 from mirthy/windows7-hostinfo
FIX: Use a .NET API call instead of a Win8+ cmdlet
2015-11-18 13:11:10 -08:00
Mitchell Hashimoto b34db6a433 Merge pull request #6219 from jgoldschrafe/f-better-ubuntu-systemd-detection
Better Ubuntu systemd detection
2015-11-18 13:10:09 -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 b7a610a808 Merge pull request #6203 from dustymabe/master
Fix Fedora /etc/hosts bug
2015-11-18 12:55:23 -08:00
Mitchell Hashimoto 10c53dfb4b update CHANGELOG 2015-11-18 12:54:42 -08:00
Mitchell Hashimoto 34dc9e237e Merge pull request #6195 from ArloL/fix-windows-xp-shell-provisioning
Check if Schedule.Service com object is available
2015-11-18 12:52:24 -08:00
Mitchell Hashimoto e6098f6c4f rename to powershell_elevated_interactive 2015-11-18 12:51:18 -08:00
Mitchell Hashimoto dde21bc95a fix file permissions 2015-11-18 12:48:41 -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 7345c67b98 Merge pull request #6160 from lonniev/lonniev_rsync_issue_6115_branch
Scrub Guest Paths for Windows Rsync leaving Dirty Paths for Winrm Mkdir
2015-11-18 12:10:09 -08:00
Mitchell Hashimoto 4ccf83de44 Merge pull request #6172 from glensc/pld/networking
fix network detection on pld-linux
2015-11-18 12:08:53 -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 aa0f57f7b7 Merge branch 'master' of https://github.com/apertoso/vagrant into apertoso-master 2015-11-18 12:00:12 -08:00
Mitchell Hashimoto fedc7e21b3 provisioners/salt: deprecate config_dir 2015-11-18 11:56:07 -08:00
Mitchell Hashimoto 6c250d023e Merge pull request #6073 from johntron/revert-74d22069
Stop trying to upload minion config to privileged directory
2015-11-18 11:52:06 -08:00
Mitchell Hashimoto ab1c0a889c Merge pull request #6050 from benh57/fix_environment_error
Fix string parse error in the environment path missing error message.
2015-11-18 11:40:41 -08:00
Mitchell Hashimoto 6639d56c9c Merge pull request #5999 from PatOShea/patch-4
Correct salt-minion and call ext on windows guest
2015-11-18 11:39:09 -08:00
Mitchell Hashimoto 7f25d49e81 Merge pull request #5991 from Mattias-/fix-puppet-environment-manifest
Fix puppet apply environment default manifest
2015-11-18 11:31:54 -08:00
Mitchell Hashimoto 3d6b11375a commands/plugin: plugin-clean-sources 2015-11-18 11:21:39 -08:00
Mitchell Hashimoto 946d2fe154 Merge pull request #4738 from robkinyon/skip_default_sources
Added a --plugin-clean-sources parameter
2015-11-18 11:20:34 -08:00
Mitchell Hashimoto d0ad747914 Merge pull request #5986 from denisbr/master
Specify time and don't do -h -H which is not really a valid usage.
2015-11-18 11:02:43 -08:00
Mitchell Hashimoto b69d635f75 commands/up: use sets 2015-11-18 10:59:29 -08:00
Mitchell Hashimoto fdd3b5c7ec Merge pull request #5981 from jkburges/named_provision_with
Allow provisioner instance names to be specified for `up` and `reload…
2015-11-18 10:54:22 -08:00
Seth Vargo 176b38880d Merge pull request #6534 from mitchellh/sethvargo/less_access_token
Only append access_token the first time
2015-11-18 10:53:34 -08:00
Mitchell Hashimoto 6bc286a70b website: update docs for powershell 2015-11-18 10:51:18 -08:00
Mitchell Hashimoto e34af86acf commands/powershell 2015-11-18 10:46:17 -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
Mitchell Hashimoto 8bbf6f56f4 Merge pull request #4400 from mwrock/ps-cmd
Add a ps command to vagrant that drops the user into a remote powershell shell
2015-11-18 10:41:36 -08:00
Gilles Cornu 819c9b6425 provisioners/ansible_local: align console outputs
Use "info" level for main tasks (installing ansible, running galaxy,
running playbook).
Use "detail" level for subsequent details.
2015-11-18 09:37:27 +01:00
Gilles Cornu c1f3d114f5 provisioners/ansible(both): add galaxy support
Close #2718
2015-11-17 22:08:29 +01:00
Gilles Cornu a0576349fe provisioners/ansible(both): reorganize i18n texts
These adaptations will make even more sense with the upcoming
introduction of `ansible-galaxy` support.
2015-11-17 22:08:18 +01:00
Olivier Meurice 80021ceafb Add network configuration plugin for Slackware Linux 2015-11-12 14:33:04 +01:00
Gilles Cornu 75cc6ef8d3 provisioners/ansible_local: fix a str-to-sym bug
Without this change `ansible.version = "latest"` is not considered as
equivalent to `ansible.version = :latest`.
2015-11-12 09:14:35 +01:00
Gilles Cornu c6ef73a6fa Merge 'gildegoma/2103-ansible-local-v2'
Resolve conflict in CHANGELOG.md
2015-11-10 23:05:29 +01:00
Christian Berendt 3f4a372d57 Remove all available versions of a box
This patch introduces a new parameter --all for the remove
command of the box plugin. Setting this parameter will remove
all available versions of a specific box.

Example usage:

```
$ vagrant box list
ubuntu/trusty64 (virtualbox, 20150427.0.0)
ubuntu/trusty64 (virtualbox, 20150430.0.0)
ubuntu/trusty64 (virtualbox, 20150506.0.0)
```

```
$ vagrant box remove ubuntu/trusty64
You requested to remove the box 'ubuntu/trusty64' with provider
'virtualbox'. This box has multiple versions. You must
explicitly specify which version you want to remove with
the `--box-version` flag. The available versions for this
box are:

 * 20150427.0.0
 * 20150430.0.0
 * 20150506.0.0
```

With the --all parameter it is possible to remove all versions at once.

```
$ vagrant box remove --all ubuntu/trusty64
Removing box 'ubuntu/trusty64' (v20150506.0.0) with provider 'virtualbox'...
Removing box 'ubuntu/trusty64' (v20150430.0.0) with provider 'virtualbox'...
Removing box 'ubuntu/trusty64' (v20150427.0.0) with provider 'virtualbox'...
```
2015-11-09 09:32:18 +00: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 baea923e9c commands/up: automatically install providers 2015-11-05 13:58:15 -08:00
Luca Invernizzi df32f6ac51 Update docker installer to work on custom kernels
The current docker installer attempt to install the linux-image-extra-`uname -r` DEB package on Debian systems.
This package may not exist, for example on custom kernels (e.g., Linode servers).
If this happens, Vagrant halts the provisioning. However, this package is not really needed in newer Debian releases (such as Ubuntu 14.04).

This small patch checks if the linux-image-extra-`uname -r` package exists, and it will install it if it does. In either case, it will continue provisioning.
2015-11-05 13:56:13 -08:00
Clayton O'Neill d863242538 Add Errno::ENETUNREACH to SSH rescue
This changes the ssh ready? method to treat ENETUNREACH the same way as
EHOSTUNREACH errors.

When attempting to SSH into a box, it tries up to 5 times to connect to
the box, ignoring various errors.  Later it will catch and gracefully
handle most of those errors so that callers don't have to know the
details.

However, the Errno::ENETUNREACH error is not caught, which means that
callers that expect a clean boolean return from ready? don't get that,
and instead get an exception they probably aren't expecting.
2015-11-05 15:40:27 -05:00
Indrek Ardel 4a7aa83e58 Use UNC paths for shared folders on Windows host 2015-11-05 18:56:24 +02:00
Indrek Ardel ea66e22d2e Use UNC paths for shared folders on Windows host 2015-11-05 18:55:34 +02:00
Mitchell Hashimoto abb1030f10 hosts/windows: install VirtualBox 2015-11-04 19:37:55 -08:00
Mitchell Hashimoto dad5962ebb hosts/darwin: support virtualbox install 2015-11-04 15:47:56 -08:00
Mitchell Hashimoto 72e13ee9ef test: add tests for provider command 2015-11-04 14:26:22 -08:00
Mitchell Hashimoto d4ddb3c2f3 commands/provider 2015-11-04 14:20:48 -08:00
Eric Winkelmann e687f81fce Re-word Linux RDP error to include `xfreerdp`.
Changed the name of the error LinuxRDesktopNotFound to
LinuxRDPClientNotFound and re-worded error text in
templates/locales/en.yml to include `xfreerdp` when listing supported
RDP clients.
2015-11-02 23:42:01 -08:00
Eric Winkelmann 879977832c Prefer xfreerdp for RDP connections on Linux hosts.
Rather than only using rdesktop (which does not work properly with newer
versions of RDP), use xfreerdp if available and fall back to rdesktop if
not.
2015-11-02 23:39:06 -08:00
Aneesh Agrawal 84408c1682 Enable log_level and colorize for salt masterless 2015-11-02 20:57:29 -05: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 8e7a297fb5 Fix for interpolated strings being used for username and passwords, this fix was made in commit 1dd081d but was removed by 1152b4e. This was causing passwords with $ in them to stop working as the dollar sign was getting stripped out 2015-10-28 16:39:19 +00:00
Markus Perl 61466c8e65 #5186: Warning: Authentication failure. Retrying... after packaging box 2015-10-17 23:00:39 +02:00
Mitchell Hashimoto efa01abb12 providers/virtualbox: if no box, don't import the master 2015-10-16 10:30:04 -07:00
Timotei Dolean 13be9731ab Remove back tick in puppet facts definitions #6403
Starting with vagrant 1.7.3 
(commit 1152b4e1df) we don't
save the command to be executed in the file anymore, but we send
it as a parameter, thus the back tick makes things worse.
2015-10-16 16:20:15 +03:00
Dan Dunckel aec65b5d66 Fix user to username that was lost in merge conflict resolution 2015-10-15 12:41:08 -07:00
Dan Dunckel d859a3b752 Somehow I missed this param while resolving conflicts 2015-10-15 12:36:19 -07:00
Dan Dunckel 9d87be51da Small refactor on conditional check and add tests 2015-10-15 12:25:50 -07:00
Marc Siegfriedt 8e87990599 add the option to make elevated interactive scripts 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
Tadej Janež 29e60882ca Fixes Fedora network issues when biosdevname command is not present.
Previously, configuring and enabling network interfaces failed with:

"The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/usr/sbin/biosdevname --policy=all_ethN -i bash: /usr/sbin/biosdevname:
No such file or directory

Stdout from the command:

bash: /usr/sbin/biosdevname: No such file or directory"

The previous attempt to fix this (ccc4162) doesn't work since it doesn't
properly parse the 'bash: /usr/sbin/biosdevname: No such file or
directory' error message.

This patch works around that problem and adds a comment explaining the
meaning of the return codes.
2015-10-11 23:10:26 +02:00
Johannes Graf 9998544995 Fix for #6151 / provisioner puppet_server with Puppet Collection 1
puppet_server provisioner fails with Puppet Collection 1 with the
following error:

```bash
==> default: Running provisioner: puppet_server...
The `puppet` binary appears not to be in the PATH of the guest. This
could be because the PATH is not properly setup or perhaps Puppet is not
installed on this guest. Puppet provisioning can not continue without
Puppet properly installed.
```
2015-10-10 21:16:12 +02:00
Mikhail Zholobov f930fa94af Move "cant_read_mac_addresses" error to the global space
Now it is used not only by Windows, but by Darwin guests as well.
2015-10-09 14:57:41 +03:00
Mikhail Zholobov e426455309 guests/darwin: Configure network following the MAC addresses matching
Currently `configure_networks` guest cap configures NICs following the device order and fails
when the device order is mixed. We should detect the appropriate NIC by its MAC address.
2015-10-09 14:57:41 +03:00
Mitchell Hashimoto 36cfc77167 providers/virtualbox: make prepare clone a core thing 2015-10-08 16:02:37 -04:00
Jurnell Cockhren 86e56aeac3 Revert "Salt Provisioner: Added a 'custom' option to install_type to allow more flexibility in passing arguments to the bootstrap script. Updated the docs."
This reverts commit 0289ab986c.

Refers to issues #6276, #5973, #5936 and #5435

Conflicts:
	website/docs/source/v2/provisioning/salt.html.md
2015-10-08 15:01:00 -05:00
Jurnell Cockhren 1a7c6dcfeb Revert "Salt Provisioner: refactor custom install_type option to add install_command instead"
Refers to issues #6276, #5973, #5936 and #5435

This reverts commit 72e63767ac.

Conflicts:
	website/docs/source/v2/provisioning/salt.html.md
2015-10-08 15:01:00 -05:00
Jurnell Cockhren fb611c7389 Revert "Initialize the install_command salt config var"
Refers to issues #6276, #5973 and #5936

This reverts commit ccd7354665.
2015-10-08 15:01:00 -05:00
Jurnell Cockhren 70e9079449 Revert "Fix alignment of initializer"
Refers to issues #6276, #5973 and #5936

This reverts commit 27d7518636.
2015-10-08 15:01:00 -05:00
Mitchell Hashimoto 5ea24e39d0 providers/virtualbox: unify import/clone 2015-10-08 13:07:05 -04:00
Mitchell Hashimoto 4908cd9cd9 providers/virtualbox: copy SSH key 2015-10-08 12:58:06 -04:00
Mitchell Hashimoto e9922d1754 providers/virtualbox: discard state if cloning 2015-10-08 12:50:02 -04:00
Mitchell Hashimoto dbcc936a71 kernel/v2: box is optional if clone is set 2015-10-08 12:41:16 -04:00
Mitchell Hashimoto f0ddac8c9a providers/virtualbox: clone 2015-10-08 12:33:55 -04:00
Mitchell Hashimoto c5c3ba616b providers/virtualbox: some progress 2015-10-08 12:09:46 -04:00
Mitchell Hashimoto 9f05d22eb0 providers/virtualbox: cloning can do a non-linked clone 2015-10-08 12:03:58 -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
Mitchell Hashimoto 44d484e2e0 providers/virtualbox: ability to customize linked clone snapshot 2015-10-08 11:58:47 -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 50638b2e55 commands/cap: require_relative 2015-10-08 10:42:10 -04:00
Mitchell Hashimoto 0a52e06298 commands/snapshot: use require relative 2015-10-08 10:40:46 -04:00
Mitchell Hashimoto 0b2d60ac39 commands/cap: better help 2015-10-08 10:36:44 -04:00
Mitchell Hashimoto 99d29f17fa commands/cap 2015-10-08 10:35:36 -04:00
Mitchell Hashimoto 6e187aaefb providers/virtualbox: v4.2 and 4.3 support 2015-10-08 08:57:21 -04:00
Mitchell Hashimoto 0abc17eaed commands/snapshot: push now uses caps to be more resilient 2015-10-08 08:55:13 -04:00
Mitchell Hashimoto 7480b65e9d providers/virtualbox: use caps for snapshot list 2015-10-08 08:46:36 -04:00
Mitchell Hashimoto ed4df21c85 commands/snapshot: push and pop 2015-10-07 22:52:27 -04:00
Mitchell Hashimoto c36b682e40 providers/virtualbox: fix error if no snapshots 2015-10-07 22:22:55 -04:00
caleblloyd 00894b5a27 hyper-v boot device by generation fixes #6372 2015-10-07 20:25:09 -04:00
Mitchell Hashimoto 8c0e38b397 providers/virtualbox: snapshot restore 2015-10-07 16:48:29 -04:00
Mitchell Hashimoto c635352b89 providers/virtualbox: list snapshots, progress for delete 2015-10-07 16:41:58 -04:00
Mitchell Hashimoto d0e8ecfc73 providers/virtualbox: snapshot save/delete 2015-10-07 16:16:53 -04:00
Mitchell Hashimoto a99ebcb3ce commands/snapshot 2015-10-07 15:52:37 -04:00
Guillermo Bonvehí 07e38f1bb3 Fix Slackware Host detection and nfsd checks
Slackware's version file is /etc/slackware-version not
/etc/slackware-release.
pidof is not on PATH by default (not running as root) so call it using
full path
2015-10-07 01:17:07 -03:00
Mitchell Hashimoto 0586412f9d providers/virtualbox: fix some crashing bugs 2015-10-06 16:22:48 -04:00
Mitchell Hashimoto 2c936b2e37 providers/virtualbox: tidying up the linked clone feature 2015-10-06 14:11:41 -04:00
Mitchell Hashimoto d519d927fa Merge branch 'VB-linked-clone-support' of https://github.com/mpoeter/vagrant into mpoeter-VB-linked-clone-support 2015-10-06 13:50:34 -04:00
ctammes 0556b3b040 Update push.rb
https://github.com/mitchellh/vagrant/issues/5570

When uploading from Windows to Linux, the Windows filepath was added to the Linux path.
2015-10-06 14:02:45 +02:00
Mitchell Hashimoto 2299715b41 providers/virtualbox: code review comments 2015-10-01 17:01:27 -04:00
Mitchell Hashimoto 05fbb4ced2 providers/virtualbox: more support 2015-10-01 08:50:47 -04:00
Mitchell Hashimoto 061a91d09b providers/virtualbox: workaround IPv6 routing bug in VB
VirtualBox has a bug where the IPv6 route is lost on every other
configuration of a host-only network. This is also triggered when a VM
is booted.

To fix this, we test the route-ability of all IPv6 networks, and
reconfigure if necessary. This is very fast but we still only do this if
we have any IPv6 networks.
2015-09-30 18:19:37 -07:00
Mitchell Hashimoto 0d50f454ea providers/virtualbox: VB5 support 2015-09-30 17:29:23 -07:00
Mitchell Hashimoto ec0b0fb7f9 providers/virtualbox: IPv6 host only networks 2015-09-30 17:23:25 -07:00
Maarten De Wispelaere cfd4270cdb FIX bug introduced in #6315 2015-09-28 09:08:20 +02:00
Brian Dwyer fd593a85b7 Add `nodes_path` support for the Chef-Solo provisioner 2015-09-27 23:23:28 -04:00
Maarten De Wispelaere e0dad41b0c FIX: no exception for debian 8 needed, shutdown -h -H doesn't work ; use normal shutdown -h now 2015-09-24 12:18:59 +02:00
Trey Briggs a5b6e23e20 Removed extra quote in powershell command. 2015-09-22 23:28:14 -05:00
Trey Briggs ed1c219a07 version is a Symbol, convert to String before concat. 2015-09-22 23:26:02 -05:00
tomfanning 41beaac074 Hyper-V set mac address 2015-09-22 11:35:55 +01:00
Rickard von Essen acde6e1b16 Use dnf on Fedora guests instead of yum if available.
Fixes #6286 now properly installs Docker on Fedora guests.
Fixes #6287 use dnf if available.
2015-09-20 09:30:49 +02:00
Sam Phippen 53714abfa3 Handle encoding errors in shell provisioner newline normalization.
The problem demonstrated in #6065 is that a string has incorrectly been
encoded with US-ASCII even though it contains invalid US-ASCII byte
sequences (any byte with the most significant bit on is invalid in the
US-ASCII encoding).

The thing about doing newline normalization is that it is not actually
sensitive to the presence of US-ASCII byte sequenzes. Additionally, it
is very unlikely that a user will ever be using an encoding where \r\n
is not encoded the same as it would be in ASCII.

This patch first tries the existing method of normalizing the newlines
in the provided script file, if that fails for any reason it force
encodes the string to ASCII-8BIT (which allows the most significant bit
to be on in any individual byte) and then performs the substitution in
that byte space.
2015-09-12 14:36:54 +01:00
Philip Wigg 33b4d6a63d Fix verify_binary for Puppet for Windows guests. 2015-09-11 20:06:21 +01:00
Kristoffer Grönlund 1911586832 Better NFS status check command for SUSE 2015-09-10 10:05:14 +02:00
Jeff Kwan 4b32744424 Use a .NET API call instead of a Win8+ cmdlet
The root cause is that Windows 7 doesn't have Get-NetIPAddress (
see:
https://stackoverflow.com/questions/19529442/gather-ip-address-information
)
but the change was to try and solve the bug that the VPN IP
addresses
aren't visible detailed
here:
https://support.microsoft.com/en-us/kb/2549091

Resolved using the
2nd solution
from
http://serverfault.com/questions/145259/powershell-win32-networkadapterconfiguration-not-seeing-ppp-adapter
2015-09-03 16:54:41 -04: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
Jeff Goldschrafe c7186236f1 Better Ubuntu systemd detection
Check the running process at PID 1 to determine which init system is currently in use.
2015-08-31 17:24:13 -04:00
Jeremy Roberts c844a9c4fd Adding WinRM execution_time_limit to log. 2015-08-31 11:42:35 -04:00
Jeremy Roberts 18d229ca82 Added execution_time_limit for WinRM.
Adds a configurable value for WinRm and the elevated permission shell ExecutionTimeLimit.

Please see mitchellh/vagrant#5506

Ex: config.winrm.execution_time_limit = "P1D"
2015-08-31 11:42:25 -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
Dusty Mabe be90f6b1da Fix Fedora /etc/hosts bug
Update so that localhost entries don't get deleted when the hostname
gets added to the 127.0.0.1 line. Closes #6202
2015-08-27 16:53:21 -04:00
Arlo Louis O'Keeffe af0f267b50 Check if Schedule.Service com object is available 2015-08-26 00:15:03 +02:00
Elan Ruusamäe f71b27ff27 fix network detection on pld-linux
pld linux uses redhat as base, but lacks :flavour
this will add it
2015-08-21 12:49:36 +03:00
Lonnie VanZandt b897fd7365 Scrub Guest Paths for Windows Rsync leaving Dirty Paths for Winrm Mkdir
Windows offers no out-of-the-box rsync utility. By far, the most
commonly used external utilities for Windows rsync are built with the
GNU Cygwin libraries. The cost for this convenience is that rsync on
Windows has to be provided paths that begin “/cygdrive/c” rather than
“c:/“ like other Windows-API utilities. Compounding the situation,
rsync doesn’t create paths/to/sub/targets and so the vagrant plugin
code, when performing an rsync, is responsible for creating
intermediate directories in guest paths if there are any. Furthermore,
the mkdir utility in Windows is not another Cygwin utility like rsync
but the routine mkdir of Windows command.com. Therefore, while rsync
needs the /cygwin paths, mkdir uses the Windows paths. Later, the
chef_solo.rp provisioner running within the guest will expect to find
Windows-style paths in its solo.rb configuration file. Due to all this,
vagrant has to keep track of both the original, possibly dirty Windows
guest path and the cygwin-scrubbed guest path.
2015-08-18 10:56:13 -06: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
Manuel Pöter 2a2f0a4751 Use hash of machine name for lock file to avoid problems with invalid characters for file names. 2015-08-12 14:25:54 +02:00
Mike Averto 587c88e65a Fix Win 10 Enterprise Vagrant Error
This fixes error for Win 10 Enterprise:

An error occurred while executing a PowerShell script. This error
is shown below. Please read the error message and see if this is
a configuration error with your system. If it is not, then please
report a bug.

Script: get_vm_status.ps1
Error:

C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.7.4\plugins\providers\hyperv\scripts\get_vm_status.ps1 : Unable to
find type [Microsoft.HyperV.PowerShell.VirtualizationOperationFailedException].
At line:1 char:1
+ &('C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.7.4\plugins\prov ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Hyper...FailedException:TypeName) [get_vm_status.ps1], Ru
   ntimeException
    + FullyQualifiedErrorId : TypeNotFound,get_vm_status.ps1
2015-08-09 12:44:49 -04:00
Jason Woods ff941ef4e8 Fix broken masterless minion configuration 2015-08-03 12:11:32 +01:00
John Syrinek ea7b277f41 Prevent fatal error caused by attempting to upload minion config to
privileged directory
2015-07-31 16:05:55 -05:00
Ben Hines 3f29be0de2 Fix string parse error in the environment path missing error message. 2015-07-28 11:16:20 -07:00
Brian Dwyer e4cdb473bd Bring back `nodes_path` support for the Chef Zero provisioner 2015-07-28 12:41:51 -04:00
지훈 287831dd2e Fix for Issue #6006 - cfengine will now install 2015-07-20 02:08:13 -07:00
Pat O'Shea d34bc38bf3 Updated salt-minion and call ext on windows guest
Salt-minion and salt-call are batch files on a windows guest, not executables.
2015-07-18 20:53:46 -06:00
Mattias Appelgren f349a58a1e provisioners/puppet: Fix Puppet environment default manifest
Also parse the puppet variables $codedir and $environment when
resolving a manifest path from environment.conf
2015-07-18 14:48:03 +02:00
Denis Brækhus d2b0df0a7d Specify time and don't do -h -H which is not really a valid usage. 2015-07-17 21:44:58 +02:00
Mitchell Hashimoto 4b217e2128 Merge pull request #5980 from PatOShea/PatOShea-ConfigDir-Typo
Fixed salt minion configuration directory typo
2015-07-17 12:37:44 -07:00
Jon Burgess 209556c3cd Allow provisioner instance names to be specified for `up` and `reload` commands and option `--provision-with`
Ref: https://github.com/mitchellh/vagrant/issues/5139
2015-07-17 14:26:13 +10:00
Pat O'Shea a4eede0c42 fixed typo for config_dir
Only exposed when calling highstate with config_dir being set
2015-07-16 18:45:59 -06:00
Pat O'Shea 956bbf011c Changed minion config path for windows
Copy of minion is wrong on windows. Moved to sub-dir, conf.
2015-07-16 18:37:36 -06:00
Manuel Pöter 772f276ee3 Port support for linked clones to VirtualBox 5.0 driver. 2015-07-16 13:27:24 +02:00
Mitchell Hashimoto bac5d039db providers/docker: pull setting, default false [GH-5932] 2015-07-15 11:08:01 -07:00
Mitchell Hashimoto f26293bb06 hosts/linux: sudo to copy back to exports [GH-5957] 2015-07-15 11:04:05 -07:00
Mitchell Hashimoto ce5a30b264 provisioners/puppet: fix config merging [GH-5958] 2015-07-15 10:59:34 -07:00
Mitchell Hashimoto 3476491881 update CHANGELOG 2015-07-15 10:57:38 -07:00
Mitchell Hashimoto 087ffa67b2 Merge pull request #5967 from benh57/fix_puppetwin_path
Fix custom puppet.binary_path to work properly on windows and fix puppet detection on windows.
2015-07-15 10:56:19 -07:00
Bob f12f50c552 Raise Errno::ETIMEDOUT as "acceptable" Errors::ConnectionTimeout 2015-07-15 19:41:10 +02:00
Ben Hines 46eedb6491 Back to using 'which' when no path is defined since the winrm communicator overrides it anyway. 2015-07-14 23:55:09 -07:00
Ben Hines 8c2ddac2cd Check for nil config_path. 2015-07-14 23:26:55 -07:00