Commit Graph

3537 Commits

Author SHA1 Message Date
Chris Roberts 933694d986
Merge pull request #9365 from chrisroberts/e-smb-cred-check
Check SMB credentials
2018-01-16 20:00:57 -08:00
Chris Roberts 58f66ac8ce Add full checkpoint integration 2018-01-16 14:16:49 -08:00
Chris Roberts f2f8bc2db5 Add Vagrantfile configuration option to register sensitive values 2018-01-15 07:23:47 -08:00
Chris Roberts 3664f1a627 Allow hiding environment variable values in shell provisioner 2018-01-12 17:33:47 -08:00
Chris Roberts b1c38c282e Support SMB mount option overrides 2018-01-12 17:23:00 -08:00
Chris Roberts 5444271268 Move SMB credentials validation into host capability 2018-01-12 16:55:35 -08:00
Lachlan Arthur 01bc2627be Check SMB credentials before using them 2018-01-12 15:46:31 -08:00
Chris Roberts b0fc6a06a1
Merge pull request #9294 from chrisroberts/e-smb
SMB synced folders enhancements
2018-01-12 15:02:08 -08:00
Chris Roberts 0ffec9cd6f Include explicit start to ensure start 2018-01-12 14:25:37 -08:00
Chris Roberts 15393fb725
Merge pull request #9274 from chrisroberts/f-nfs-naming
Update NFS service name usage for linux hosts
2018-01-12 13:14:07 -08:00
Chris Roberts 53fbf67d9f
Merge pull request #9295 from mcandre/patch-2
recognize solaris alternatives
2018-01-12 13:11:16 -08:00
Chris Roberts f5888a4200
Merge pull request #9307 from wink-y/amazon-perform
Modify the matching pattern of guest os for amazon linux
2018-01-12 13:08:01 -08:00
Brian Cain 5bf75dcfb3
Merge pull request #9338 from chrisroberts/fix-ubuntu17-networking
Update Debian guest configure networks
2018-01-10 10:11:47 -08:00
Brian Cain b16ca2e384
Introduce flag for SharedFoldersEnableSymlinksCreate
Prior to this commit, the virtualbox synced folder option
`SharedFoldersEnableSymlinksCreate` was always enabled. This commit
introduces a config option and an environment variable which allows
users to configure the option globally or per synced_folder in their
Vagrantfile.
2018-01-09 14:33:24 -08:00
Graham Clinch b384361cd2 Use the short flag for better cross-platform support 2018-01-09 17:58:20 +00:00
Graham Clinch 1c2929cd84 Change to a temporary directory before downloading script files, to avoid
leaving junk files in the working directory (probably ~vagrant)
2018-01-09 16:01:50 +00:00
Brian Cain 11ddd0136d
(#9044) Show all box providers in command outdated
Prior to this commit, when the `--global` flag was used with the
`vagrant box outdated` command, it would ignore box providers and not
inform the user of all outdated boxes. This commit fixes that by
displaying each box within the users environment, and includes the
provider of the box in the message.
2018-01-08 09:43:28 -08:00
Bas van der Vlies de62baed6b as requested change to test to command:`which` 2018-01-08 08:53:33 +01: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 9c4ef88b88
Merge pull request #8863 from michaeltlombardi/FullyQualifyHyperVCmdlets
Ensure Hyper-V cmdlets are fully qualified
2018-01-04 10:27:09 -08:00
Chris Roberts 913b5639e5 Do better handling given netmasks 2018-01-03 17:26:08 -08:00
Chris Roberts a36a84c85a Only apply netplan configuration if systemd is in use 2018-01-03 16:31:49 -08:00
Chris Roberts 2f3d165079 Remove version from darwin host custom mount options 2018-01-03 14:41:53 -08:00
Chris Roberts 75a03ff9e9 Update available debian networking options 2018-01-03 13:56:01 -08:00
Chris Roberts 572f341697 Include synced folder cleanup action within hyperv provider 2018-01-03 10:29:45 -08:00
Chris Roberts abf74e3757 Expand existing and requested paths prior to comparison 2018-01-03 10:05:05 -08:00
Chris Roberts 6e4139acd3 Include configuration for smb synced folders 2018-01-03 09:40:52 -08:00
Chris Roberts 5b7714f542 Include macOS as valid host platform 2018-01-03 09:30:44 -08:00
Chris Roberts 3eeff59329 Use custom types and messages for errors 2018-01-02 14:36:28 -08:00
Chris Roberts 30dcd9a7e5 Only add/remove shares on windows when needed 2018-01-02 14:03:54 -08:00
Chris Roberts 24d962eb72 Swap usage of share name and id for consistent behavior 2018-01-02 14:03:34 -08:00
Chris Roberts 98ec1af30e Add smb_start capability for darwin 2018-01-02 11:21:50 -08:00
Bas van der Vlies a5deb20dcb ifconfig is replaced by ip command suite. So use "ip addr" and failback
to ifconfig
2017-12-28 20:31:04 +01:00
winky e99c47907f Modify the matching pattern of guest os for amazon linux 2017-12-27 13:57:47 +09:00
eyJhb 12a6832151 Fixed hostonly matching not respecting :name argument 2017-12-25 20:49:35 +01:00
Chris Roberts 68439f6bac Use sudo for sharing lists on darwin platform
On systems prior to high sierra the sharing binary
requires root user for access, so use sudo to get
full list output and inspect output.
2017-12-21 14:53:55 -08:00
Chris Roberts 2caf109a03 Mark passwords as sensitive within guest capabilities 2017-12-21 12:49:34 -08:00
Andrew Pennebaker 98eb8cef03
recognize solaris alternatives
As the Solaris project is dead, recognize that Solaris alternatives like DilOS and SmartOS feature a Solaris compatible kernel and capabilities.
2017-12-21 13:07:00 -06:00
Chris Roberts 88d2b3676f Remove stale comments from helper scripts 2017-12-21 10:19:28 -08:00
Chris Roberts 61bfbade48 Remove raise error logic in windows smb capability 2017-12-21 09:55:19 -08:00
Chris Roberts 81cbdae62a Make powershell error generalized 2017-12-21 09:55:19 -08:00
Chris Roberts f89c6a37f9 Provide namespace to error class 2017-12-21 09:55:19 -08:00
Chris Roberts 5a607d9248 Clean up SMB related errors 2017-12-21 09:55:19 -08:00
Chris Roberts 00fa50c296 SMB enhancements 2017-12-21 09:55:19 -08:00
Chris Roberts e85ef1655b Always remove credentials file after mount attempts 2017-12-21 09:55:19 -08:00
Brian Cain f046482cfb [WIP] systemd networkd for debian guests 2017-12-20 16:42:51 -08:00
Brian Cain b9581ed213
Merge pull request #9251 from briancain/9137/master/exit-0-destroy-not-created
Exit 0 if vagrant destroy finds no running vms
2017-12-20 16:42:36 -08:00
Michael T Lombardi 9e1d05641f Ensure Hyper-V cmdlets are fully qualified
+ This disambuguates calls to the Hyper-V functions for the Hyper-V provider.
The ambiguity of some commands - such as `Get-VM` - causes the Hyper-V provider
to fail on systems where VMware PowerCLI is installed. This change ensures that
all calls to Hyper-V specific cmdlets or functions are prepended by `Hyper-V\`.
This ensures the correct cmdlet calls are being made.
+ Resolves  #8862.
2017-12-15 08:30:38 -06:00
Zachary Flower 4a4183398b Add a clean error message for invalid IP addresses 2017-12-14 14:57:21 -07:00
Brian Cain d4d4ed6473 (#9137) Exit 0 if vagrant destroy finds no running vms
This commit reverts the behavior of `vagrant destroy` to exit 0 if no
running vms were found when the destroy command is run.
2017-12-14 12:48:22 -08:00
Gilles Cornu 43bcf2aaf7
Merge pull request #9173 from hashicorp/gildegoma/fix-ansible-ask-sudo-pass-deprecation
Ansible Provisioner: Fix broken 'ask_sudo_pass' option
2017-12-14 21:46:23 +01:00
Chris Roberts 120722ab08 Update NFS service name usage for linux hosts
Provides simple nfs service name detection via systemd or sys-v. Defaults
are provided if no match is found. Service name is defined via method
allowing derivative guests to only need to provide an updated name.
2017-12-14 08:35:07 -08:00
Chris Roberts 3a5729015a Add documentation entry for init command --template flag 2017-12-13 15:59:45 -08:00
Chris Roberts 0c40fd3161
Merge pull request #9202 from zachflower/vagrantfile_templates
Support for custom Vagrantfile templates
2017-12-13 15:54:06 -08:00
Chris Roberts 04e35784e7
Merge pull request #9205 from mcandre/patch-1
dragonflybsd: extend FreeBSD
2017-12-13 15:42:25 -08:00
Chris Roberts b4444aeaab
Merge pull request #9245 from kallisti5/haiku-improvements
haiku: Improve capabilities. (public keys, halt)
2017-12-13 15:38:13 -08:00
Tomoyuki Sakurai 35d3be865f Atomically apply new hostname.if(5)
This fixes an issue when the interface being configured is the
interface through which ssh traffic is forwarded.

In a complex scenario, one needs to disable the default interface for
NAT, and use other interface for ssh. In this case, when vagrant run
`ifconfig #{ifname} inet delete`, the second ifconfig that is supposed
to restore interface settings will never be called. This might be a rare
need, but it is also strongly recommended to use `netstart` when
reconfiguring interfaces after updating `hostname.if(5)`.

The issue can be triggered when ssh connection has issues between two
`ifconfig` commands.
2017-12-13 18:34:17 +09:00
Andrew Hardy ad0a47bedf Removed rogue $ from string in hyperv import.rb 2017-12-10 11:09:49 +10:00
Brian Cain a724a19a5d
Merge pull request #8992 from BenjaminSchiborr/fix/master/fix_salt_windows_bootstrap
provisioners/salt: Fixes timeout issue in salt bootstrapping for windows
2017-12-07 11:27:55 -08:00
Alexander von Gluck IV 263a2c4d9b haiku: Improve capabilities. (public keys, halt) 2017-12-05 18:19:15 -06:00
Brian Cain c3a4f8d72a
Merge pull request #7805 from kallisti5/master
Add support for the Haiku operating system
2017-12-05 14:03:43 -08:00
Matthias Haag a139dd2b59 use basename for setting hostname 2017-11-22 11:09:51 +01:00
Andrew Pennebaker 2b87d12925
dragonflybsd: extend FreeBSD
Reuse FreeBSD guest code for installing rsync, etc., as dragonfly- and freebsd are very similar, especially with regard to package management.
2017-11-19 19:41:25 -06:00
Zachary Flower abb1149190 Raise an exception when the template cannot be found, and update tests accordingly 2017-11-17 12:20:03 -07:00
Zachary Flower 14d596f08e Add --template option to init command, with graceful fallback to default Vagrantfile template behavior 2017-11-17 11:30:10 -07:00
Gilles Cornu e47deb7fd0
ansible: Fix broken 'ask_sudo_pass' option
This bug (invalid method call) hasn't been caught by unit tests because
Vagrant::Plugin::V2::Config catches all invalid/bad configuration calls
and save them for generating error messages during the "validate" stage.
This way, the `ask_sudo_pass=(value)` method was not interrupted and the
`@ask_become_pass` attribute was (surprisingly) correctly set (allowing
the related unit tests to pass).

In order to avoid similar problem to happen again, the deprecation
message output is now fully verified.
2017-11-09 18:17:04 +01:00
Justin Campbell 40d8dc4582 Add app.vagrantup.com to allowed auth hosts
This should allow users setting VAGRANT_SERVER_URL to app.vagrantup.com to authenticate to private boxes.
2017-11-07 10:35:16 -05:00
Justin Campbell c5266e98b8 Change allowed auth hosts to list 2017-11-07 10:32:33 -05:00
Benjamin Schiborr ee800cc7c2 provisioners/salt: #8991: Break if success
This commit ensures that we actually break when the download was
successful. Before it tried to download again for every iteration of the
loop. In addition the number of iterations have been increased. I've
experienced timeouts on third retry. Increasing to 5.
2017-11-06 13:56:11 -08:00
Brian Cain 8be2ae8e6a Add unit test for destroy command 2017-11-01 15:30:59 -07:00
Brian Cain d8bffd201f Add delay for parallel destroy without force, restructure state checking
This commit adds better messaging to the user if the parallel flag is
used without the force flag. It also makes the state checking based on
the delta between the initial and final states of the guests due to the
fact that there is no guarantee what the "destroyed" state id will be
between providers.
2017-10-31 13:52:07 -07:00
Brian Cain 2d7858ff8a Introduce parallel destroy for certain providers
This commit introduces parallel destroy using the batch action class for
the destroy command.
2017-10-31 11:29:40 -07:00
Adam Bolte 511fac8162
Attempt fetching salt bootstrap script with wget
On Debian installations, wget is installed even into the most minimal
environment. Even Python support on Debian cannot be guaranteed if
Standard System Utilities was not selected at installation time (or if
debootstrap was used), which is why the retrieved bootstrap-salt.sh
script takes care of installing it prior to installing Salt.
2017-10-26 13:41:40 +11:00
Brian Cain c7ec0a42a5 (#8941) Include WinSSH Communicator
This commit requires the winssh communicator class wihtin the public_key
capability for Windows. Prior to this commit users could run into a
situation where Vagrant would check if the machine could speak in WinSSH
and fail on an uninitialized constant.
2017-10-24 12:02:01 -07:00
Chris Roberts fc7d2a3097 Merge pull request #8921 from lookfwd/fix_8608
fix for issue #8608/Windows hosts
2017-10-23 16:58:39 -07:00
Chris Roberts eaa518159c Merge pull request #8997 from bshurts/fix/winrm-apipa
Adding check for APIPA in winrm helper to fix #8996
2017-10-23 16:47:32 -07:00
Chris Roberts 6eca74afc7 Merge pull request #9012 from benh57/winssh_communicator_fix
Fix guest network setup with winssh communicator
2017-10-23 15:41:53 -07:00
Vít Ondruch 7187e6f909 Use Integer instead of Fixnum for Ruby 2.4+ compatibility. 2017-10-23 10:57:36 -07:00
Brian Cain e1d1ba5d55 (#8974) Add Errno::EPIPE exception to ssh communicator
This commit adds an additional exception to retry ssh on when bringing
up a machine and attempting to ssh into the guest.
2017-10-17 16:44:14 -07:00
Brian Cain 47edb88fe4 Merge pull request #9034 from briancain/unify-solaris-guests
Unify Solaris Guests
2017-10-11 15:37:24 -07:00
Brian Cain c88ccb0b3d Merge pull request #9014 from benh57/winssh_puppet_fix
Fix winssh communicator support in puppet provisioner
2017-10-10 09:46:59 -07:00
Brian Cain a849cd2f7d (#8963) Unify Solaris Guests
This commit removes some duplicated code within the Solaris11 guest
implemnentation and instead relies on the Solaris guest for the majority
of its guest capabilities.
2017-10-05 11:31:12 -07:00
Bryce Shurts ba3c26b211 Updating winrm_info_invalid to use start_with instead of match 2017-10-05 10:28:10 -05:00
Jonathan LaBroad 56861296fa Added tests and validation for python_version parameter 2017-10-05 06:25:36 -04:00
Jonathan LaBroad 3524eb9ef4 Merge remote-tracking branch 'upstream/master' 2017-10-04 14:59:57 -04:00
Brian Cain fb1501d48a Merge pull request #8874 from taliesins/HandleChefProvisionerRebootRequest
Handle chef provisioner reboot request
2017-10-04 09:37:02 -07:00
Brian Cain 9d360d2b21 Merge pull request #9000 from bbrala/bug-hyperv-auto-stop-action
Auto stop action is configured wrongly
2017-10-04 09:12:09 -07:00
Brian Cain 83310f8a56 Merge pull request #8955 from jehiah/virtualbox52_8955
Virtualbox 5.2 support
2017-10-03 13:25:39 -07:00
Ben Hines e133547932 Properly call winssh communicator on windows via powershell, and fix syntax for powershell via puppet. 2017-09-29 20:53:09 -07:00
Ben Hines ea518f6c78 test() defaults to powershell for winssh, no need to pass it 2017-09-29 19:30:07 -07:00
Ben Hines 6b4584efb6 Use the 'powershell' shell when running powershell commands. Allows winssh communicator to function 2017-09-29 19:17:49 -07:00
Brian Cain 87ee4f5662 Merge pull request #8995 from elatt/fix_synced_folders_spaces
Allow synced folders to contain spaces in the guest path
2017-09-29 15:19:39 -07:00
Erik Lattimore 28a92850ab Allow synced folders to contain spaces in the guest path
It should be valid to allow paths with spaces for the synced folder
guest path but since the guest path is used to generate the ID (if one
isn't provided), this will err out in VirtualBox because it doesn't
allow spaces for the --name argument. We should simply convert ' ' to
'_' as we do with other special characters.
2017-09-29 17:24:12 -04:00
Björn Brala 0f743d0731 Auto stop action is configured through auto start action. 2017-09-26 16:03:35 +02:00
Bryce Shurts 0eaf691ea0 Adding check for APIPA in winrm helper to fix #8996 2017-09-25 16:31:37 -05:00
Benjamin Schiborr c30c00508c provisioners/salt: #8991: Fixes timeout issue in salt bootstrapping for windows
Fixes #8991.

1. When remote executing scripts one should always call powershell with
1a. "-NonInteractive", in order to prevent interactive prompts from leading to an endless waiting time for the script to return
1b. "-NoProfile", in order to prevent the loading of unknown custom profiles before execution of the script which could have unintended side effects
2. During my tests I constantly ran into 408 timeouts when downloading the salt binaries. I've prevented that by adding a simple retry mechanism and an error exit in case of multiple failures. Without this change the bootstrap script never returned (and neither did vagrant up)
2017-09-22 18:08:30 -07:00
Mikhail Bulash 508d94d466 provisioners/shell: Use ui.detail for displaying output
Output format of ui.info method (bold text) makes reading long script outputs really heavy on the eyes. ui.detail is a better match for this type of output.
2017-09-18 17:55:07 +03:00
Jehiah Czebotar 7d73af5637
Virtualbox 5.2 support 2017-09-14 15:07:11 -04:00
Jonathan LaBroad 6f53c3991c Merge remote-tracking branch 'upstream/master' 2017-09-11 09:15:22 -04:00
Chris Roberts 2451c859e8 Merge pull request #8746 from mastersin/alt
Add ALT Linux platforms guest detection and network configuration support (#8745)
2017-09-06 17:49:38 -07:00