Commit Graph

3650 Commits

Author SHA1 Message Date
Brian Cain 6fc2d9d82d
Merge pull request #9754 from briancain/DOCKER-PROV-WINDOWS
Update docker provisioner for windows, fix command filter behavior for `rm`
2018-05-01 13:46:33 -07:00
Brian Cain 93356d4635
Update rm filters to test for path
This commit updates the rm filter for winrm to operate like how rm works
in bash. If a folder doesn't exist, the command returns 0 rather than 1.
2018-05-01 13:35:45 -07:00
Chris Roberts 9f08337ce1 Ignore errors on neighbor lookup and validate result 2018-04-30 17:39:27 -07:00
Chris Roberts 39bb589f7d
Merge pull request #9739 from chrisroberts/f-midware-invalid-uri
Ignore URLs which cannot be parsed in the authentication middleware
2018-04-27 17:03:02 -07:00
Chris Roberts e47e1df228 Reference Hyper-V switch by ID instead of name
Keep track of selected Hyper-V switch using the ID instead of name
to prevent any encoding issues that may occur switching between
PowerShell and Ruby. With the IDs staying consistent, the switch
name can be fetched from the provided ID.

Fixes #9679 #8794 #9451
2018-04-27 16:52:16 -07:00
Joe Pleso c882d888a7
Add docker cap to windows to detect daemon and fix whitespace 2018-04-27 09:45:24 -07:00
Brian Cain 1f25b2cc22
Merge pull request #9736 from briancain/disable-loading-triggers-if-plugin-exists
Add warning if vagrant-triggers plugin is installed
2018-04-26 16:11:31 -07:00
Chris Roberts 97f5822dee Ignore URLs which cannot be parsed in the authentication middleware
Fixes #9725
2018-04-26 15:08:06 -07:00
Brian Cain 1ef45d8073
Add warning if vagrant-triggers plugin is installed
To allow users to continue to use the community plugin, this commit adds
a switch that will not load the core trigger feature if it detects the
community plugin is installed. It also allows the user to disable the
warning so they can continue to use the plugin without extra output.
2018-04-26 14:59:09 -07:00
Chris Roberts d2ec4d9312
Merge pull request #9734 from chrisroberts/f-win-smb-mount
Default SMB version to 2.0 for linux guest mounts on Windows hosts
2018-04-26 14:48:01 -07:00
Chris Roberts d15ff38d5c Check neighbors for valid guest address when default lookup fails
If the guest address is unavailable via Hyper-V inspection, extract
MAC address of network adapters and check neighbor information for
any currently matching known address.
2018-04-26 12:53:52 -07:00
Chris Roberts 40a1d2faf3 Default SMB version to 2.0 for linux guest mounts
Fixes #8959
2018-04-26 08:45:05 -07:00
Chris Roberts 5feb234665 Return original URL value when unmodified
Due to the behavior of URI.parse on Ruby < 2.5 returning the string
value of the parsed URI object may modify the original URL. Specifically
it will remove the `//` prefix characters from SMB paths. When no
host modifications are being made, always return the original value.

Fixes #9636
2018-04-25 16:21:21 -07:00
Brian Cain b409f0e203
Merge pull request #9669 from dduponchel/data_bags_path
Support arrays for data_bags_path in chef-zero
2018-04-24 15:45:36 -07:00
Brian Cain 5643ba0c7d
Merge pull request #9713 from briancain/vagrant-triggers-config
Integrate vagrant-triggers plugin functionality into core Vagrant
2018-04-24 11:35:04 -07:00
Brian Cain a9be56b356
Code updates based on PR feedback 2018-04-24 10:04:40 -07:00
Brian Cain 7f004656db
(#9718) Properly finalize structured_facts config option
This commit sets the structured_facts option to nil if its still
UNSET_VALUE at the finalize step. This was causing a bug when the facter
config was set but was not using structured facts.
2018-04-23 14:23:59 -07:00
Brian Cain e25cb51f15
Properly print warnings on config settings that aren't supported 2018-04-20 10:51:38 -07:00
Brian Cain 12b1a3dfe4
Update triggers based on code review 2018-04-20 10:51:38 -07:00
Brian Cain e0806f623c
Remove TODO 2018-04-20 10:51:38 -07:00
Brian Cain 0054c5aae6
Raise error if incomplete trigger block is defined 2018-04-20 10:51:38 -07:00
Brian Cain 767a315393
Trigger cleanup 2018-04-20 10:51:38 -07:00
Brian Cain 693eb2fbbb
Add machine level warning when privileged option is set for run 2018-04-20 10:51:38 -07:00
Brian Cain 3ad4f576c0
Add only_on validation for config 2018-04-20 10:51:38 -07:00
Brian Cain ca672eb8e6
Trigger plugin cleanup 2018-04-20 10:51:38 -07:00
Brian Cain 85dedf25d9
Ensure that :all triggers don't get filtered out 2018-04-20 10:51:38 -07:00
Brian Cain 2c30eab723
Don't run local commands as sudo by default 2018-04-20 10:51:38 -07:00
Brian Cain eac2fcf71e
Filter triggers based on only_on restraint 2018-04-20 10:51:38 -07:00
Brian Cain 372a6a7911
Initial trigger plugin scaffolding 2018-04-20 10:51:38 -07:00
Brian Cain a5d8cc1caa
Update trigger classes with comments 2018-04-20 10:51:38 -07:00
Brian Cain 956ed004bb
Update trigger config merge function 2018-04-20 10:51:38 -07:00
Brian Cain abb6d77442
Move location of command validator 2018-04-20 10:51:38 -07:00
Brian Cain 6cbb5d8e5d
Add unit tests for config, fix type change bug with map! 2018-04-20 10:51:38 -07:00
Brian Cain 42419bbd49
Fix rspec tests 2018-04-20 10:51:38 -07:00
Brian Cain d0d69e59c9
Update return doc string on validate 2018-04-20 10:51:38 -07:00
Brian Cain 60c4ffa8a6
Ensure run & run_remote are Hashes before updating to shell config 2018-04-20 10:51:38 -07:00
Brian Cain e752878de9
Update finalize method for run and run_remote objects 2018-04-20 10:51:38 -07:00
Brian Cain d3dde739fe
Update trigger code docs 2018-04-20 10:51:38 -07:00
Brian Cain 1591ae9916
Make run and run_remote settings shell provisioner configs 2018-04-20 10:51:38 -07:00
Brian Cain f0ec7c750b
Potential solution for trigger validation when guest is defined
Send the defined before and or after triggers in the merge function if
triggers exist already
2018-04-20 10:51:38 -07:00
Brian Cain 51e4118cc2
Debug commit 2018-04-20 10:51:38 -07:00
Brian Cain 0cbf6970fc
Update config class setting 2018-04-20 10:51:38 -07:00
Brian Cain 607368a66c
Introduce merge function to preserve internal state 2018-04-20 10:51:38 -07:00
Brian Cain d26a925bd7
Update variable doc 2018-04-20 10:51:38 -07:00
Brian Cain 5ca1d1ab64
Finalize config in plugins finalize, improve docs 2018-04-20 10:51:38 -07:00
Brian Cain b04f13657b
Move warning to logger rather than guest 2018-04-20 10:51:38 -07:00
Brian Cain a96baad0d7
Add comments for later dev 2018-04-20 10:51:38 -07:00
Brian Cain 60ff2489c4
Display warning if vagrant command for trigger is not found 2018-04-20 10:51:38 -07:00
Brian Cain 8e72ae5bd6
Add basic validation for trigger config objects 2018-04-20 10:51:38 -07:00
Brian Cain 375e8d7153
Remove old comments 2018-04-20 10:51:38 -07:00
Brian Cain 3c5e4b2464
Fix variable doc 2018-04-20 10:51:38 -07:00
Brian Cain 50ecf45d50
Add more doc to create_trigger function 2018-04-20 10:51:38 -07:00
Brian Cain c10ae070b6
Store correct command for trigger 2018-04-20 10:51:38 -07:00
Brian Cain e0a5b1d647
Parse block trigger configs 2018-04-20 10:51:38 -07:00
Brian Cain 6f00eb5679
Move trigger options into own plugin class 2018-04-20 10:51:38 -07:00
Brian Cain fdf1b58570
Introduce ids for trigger blocks 2018-04-20 10:51:38 -07:00
Brian Cain bb2f3b35b9
Add basic unit test 2018-04-20 10:51:38 -07:00
Brian Cain 7cccddc009
Add basic scaffolding for command parsing 2018-04-20 10:51:38 -07:00
Brian Cain 01b904061d
Use proper command reference for command whitelist params 2018-04-20 10:51:38 -07:00
Brian Cain 0142722787
Add run and run_remote scaffolding 2018-04-20 10:51:38 -07:00
Brian Cain 813ffd06ec
Add more trigger config options 2018-04-20 10:51:38 -07:00
Brian Cain a194057fc0
Add trigger config plugin 2018-04-20 10:51:38 -07:00
Jose Luis Duran 53acd20548
Fix network configuration on FreeBSD hosts
There was a missing space within `sed` parameters that caused the
`rc.conf` file to be wrongly created as `rc.conf-e`.
2018-04-19 16:25:16 -03:00
Isaac Freeman de71626922 docker: use Kernel.system for docker-exec when -t is given 2018-04-18 17:50:47 -04:00
Brian Cain 9f29812db8
Merge pull request #9690 from briancain/expand_nodes_path_chef
File path expand all chef_zero config path options
2018-04-18 13:04:38 -07:00
Brian Cain 9660951c89
Merge pull request #9490 from jzinn/solo-rb-cookbook-path
Improve Windows drive letter removal hack
2018-04-18 08:31:23 -07:00
Julian Zinn 269645f63d Improve Windows drive letter removal hack 2018-04-17 13:23:14 -07:00
Brian Cain 151095a3e9
Merge pull request #9420 from ryanwalder/salt-json
Add master_json_config & minion_json_config options to salt provisioner
2018-04-16 15:37:44 -07:00
Brian Cain e8ab85e92b
(#9383) File path expand all chef_zero config path options
This commit ensures that all paths are properly file path expanded for
each config option in chef_zero.
2018-04-16 11:05:39 -07:00
Brian Cain 42df3e7185
Merge pull request #9685 from briancain/improve-hostonly-conf-error
Improve network collision error message
2018-04-12 15:18:50 -07:00
Brian Cain 4db3d49157
Improve network collision error message
This commit provides a bit more information when a non-hostonly network
collides with a host network.
2018-04-12 14:16:13 -07:00
Chris Roberts 5d7506afe3
Merge pull request #9676 from chrisroberts/e-win-file-perms
Update generated ssh private key file permissions on create
2018-04-10 14:56:28 -07:00
Chris Roberts b605da0ef5
Merge pull request #9673 from chrisroberts/f-win-paths-filter
Fix windows command filters
2018-04-10 14:44:32 -07:00
Chris Roberts 9731720773 Update generated ssh private key file permissions on create
This updates the permissions on the automatically generated private
key file to only be readable by the user. Includes support for file
permission modification on Windows platform.
2018-04-10 14:15:14 -07:00
Brian Cain f1de9821e1
Merge pull request #8099 from chrisroberts/windows/shared-folder-path
Fix virtualbox shared folders path
2018-04-10 09:16:06 -07:00
Chris Roberts ddfd86f3d1 Split with shellwords and quote paths in command filter
This uses shellwords to split the command in the command filter
inside the winrm communicator. Using shellwords properly handles
things like quoted paths. Path arguments are also quoted to
prevent issues with paths that include spaces.

Fixes #9390
2018-04-09 17:00:30 -07:00
Brian Cain 7fe03988aa
Merge branch 'puppet_structured_facts_toyaml_on_provisioner' of git://github.com/aloyr/vagrant into aloyr-puppet_structured_facts_toyaml_on_provisioner 2018-04-09 11:01:36 -07:00
David Duponchel d08a472610 Support arrays for data_bags_path in chef-zero
The pull request #6561 added the support for arrays for data_bags_path
in chef-solo and chef-zero, but missed a `.first` in chef-zero (which
only keeps the first data bag path). The documentation and the template
for chef-zero are already good (since #6561).

Fixes #9668.
2018-04-09 17:46:42 +02:00
Chris Roberts 97dd9e0469 Adjust priority of network configuration file for debian guests
This adjusts the priority of the network configuration file from 99
to 50 making it easier for customized configuration.

Fixes #9592
2018-04-02 12:08:06 -07:00
Brian Cain 696ffa4e30
Merge pull request #9528 from artw/master
less specific string grep to fix PhotonOS 2.0 detection
2018-03-22 10:31:29 -07:00
Brian Cain ab24bd2cf1
Merge pull request #9600 from kinvolk/kosy/coreos
Identify operating systems closely related to CoreOS
2018-03-22 10:11:43 -07:00
Brian Cain 0ce6e9891e
Merge pull request #9572 from jsoref/spelling
Spelling
2018-03-22 09:50:52 -07:00
Kosy Anyanwu 52a8b0c65e Identify operating systems closely related to CoreOS
If the the value of ID= is not recognised, identify the OS if it is a derivative of CoreOS
https://www.freedesktop.org/software/systemd/man/os-release.html#ID_LIKE=
2018-03-20 17:51:20 +01:00
ajpaul 2c9e9e9ab8 reintroduce sleep_timeout for guests that fail the :wait_for_reboot capability check 2018-03-16 13:53:27 -04:00
Adam Paul 2dfe520eb8 add capability test before attemping to use capability 2018-03-15 11:45:42 -04:00
Adam Paul 76551a1692 Fix graceful_halt_timeout issue #8486 2018-03-15 10:38:07 -04:00
Josh Soref 1a5ddea9f4 Spelling fixes
* account
* addresses
* administrator
* afterwards
* because
* bridgeable
* capabilities
* capability
* checksum
* configuration
* configuration for
* configure
* criteria
* delimited
* delivered
* derivatives
* description
* detect
* directory
* display
* downloading
* during
* electric
* enabling
* encountered
* equivalent
* executable
* executed
* hashicorp
* hypervisor
* hyphens
* implementation
* incorporate
* inheritance
* initialize
* instance
* instead
* interactions
* invocable
* machine
* maximum
* message
* mounting
* overridden
* overwrite
* paramiko
* preparing
* provides
* provisioning
* recursively
* requested
* resetting
* retryable
* running
* satisfied
* searching
* sometimes
* specified
* successfully
* synced folders
* unauthorized
* underlying
* userprofile
* vagrant
* vagrantfile
* variable
* various
* version
* virtual
* windows
2018-03-14 14:41:04 +00:00
Chris Roberts 51232f9a03 When matching hostonly adapter name, force common types
Force a string type for comparison to prevent false positives when
the name is unset (resulting in a nil value).
2018-03-09 14:15:31 -08:00
Art Win 9c93e548af the label changed in 2.0 2018-03-01 13:05:26 +02:00
Brian Cain ac37b67eca
Merge pull request #9518 from briancain/fix-package-cmd-wsl
Convert to windows path if on WSL during vbox export
2018-02-28 08:07:56 -08:00
Brian Cain 73a5a5a8c9
(#9059) Convert to windows path if on WSL during vbox export
Prior to this commit, the incorrect path was used when determining where
to export an ovf file during the `vagrant package` step. This commit
updates that by checking if vagrant is within WSL, and if so, convert
the path to a proper windows path to be used during the export.

Fixes #9059
2018-02-27 16:02:25 -08:00
Brian Cain 0b92123163
Merge pull request #9507 from briancain/fix-hyper-v-check
Fix Hyper-v and VirtualBox check
2018-02-26 14:54:51 -08:00
Brian Cain 007e6f49aa
Merge pull request #9302 from eyJhb/master
Fixed hostonly matching not respecting :name argument
2018-02-26 14:50:45 -08:00
Brian Cain f2954a64c6
Fix Hyper-v and VirtualBox check
Prior to this commit, the hyper-v and virtualbox system crash check
existed within the initialize function of the virtualbox provider. That
caused an issue when running with other providers, because the
virtualbox provider still gets initialized even if not used. This commit
changes that by placing the check inside of one of the virtualbox
provider actions that checks if virtualbox is installed and ready to
use. This action is action is used by the main vbox provider actions,
and should not be called when other providers are being used with
Vagrant.
2018-02-23 11:24:30 -08:00
Chris Roberts a1529d5fbe
Merge pull request #8828 from mkhon/nfsv4-default-tcp
nfs_udp is false by default if using NFS v4
2018-02-23 09:50:49 -08:00
Chris Roberts fc5ceafbcf Only generate notice once 2018-02-22 14:49:44 -08:00
Chris Roberts f2bf18e56b Update behavior of the authentication middleware
Always remap old hosts to target host when encountered. When custom
vagrant server is defined, warn when tokens may be attached and allow
time for user to cancel.

Fixes #9442
2018-02-21 17:03:38 -08:00
Brian Cain b8d8cf7572
Merge pull request #9456 from briancain/exit-if-hyperv-enabled-vbox
Exit if Hyper-V is enabled and VirtualBox provider is used
2018-02-14 08:49:06 -08:00
Brian Cain 279bceffb9
Merge pull request #9398 from drscream/smartos-inheritance-solaris
More explicit Solaris 11 and inherit SmartOS from Solaris
2018-02-12 15:02:30 -08:00
Hannes Körber 3082ea502e
Debian: Point hostname to 127.0.1.1 in /etc/hosts
Closes #9403
2018-02-10 20:54:51 +01:00