Commit Graph

3549 Commits

Author SHA1 Message Date
Brian Cain a177bcf4b7
Ensure internal trigger fire does not get called if plugin installed
This commit wraps up the internal machine action level trigger calls if
the community vagrant-trigger plugin is installed.
2018-05-07 11:33:55 -07:00
Brian Cain 092e73d87f
(#9775) Move triggers object init in machine
Prior to this commit, the hyper-v provider called an action on a machine
that hadn't fully finished initializing. This commit fixes that by
moving up the initialization of the triggers object next to the rest of
the instance variables of the machine object.
2018-05-04 14:32:57 -07:00
Chris Roberts 02b9d625d3
Merge pull request #9759 from StefanScherer/wsl-remove-raise-vboxmanage-missing
Allow other providers in WSL
2018-05-03 12:42:16 -07:00
Brian Cain beb08b51a4
(#7076) Continue on if vagrant fails to parse metadata box for update
Prior to this commit, vagrant would halt if it could not parse the
metadata file for a box to check for updates with. This commit changes
that to behave like when vagrant fails to download a metadata file and
continue on but warn the user it failed to check for box updates.
2018-05-02 13:58:21 -07:00
Stefan Scherer f14e8bcbf2
Allow other providers in WSL 2018-05-02 22:36:17 +02:00
Chris Roberts 3f3777f03a
Merge pull request #9746 from chrisroberts/e-hyper-v-check
Update Windows Hyper-V check
2018-05-02 07:45:26 -07:00
Chris Roberts 3dcc350364
Merge pull request #9696 from D4rkSh1t/fix-rootpath-for-wsl
fix rootpath if the vagrantfile is located under the root directory (WSL)
2018-04-27 17:04:23 -07:00
Chris Roberts a997a27b57 Update Windows Hyper-V check
Checks only if the Hyper-V hypervisor is enabled instead of all
Hyper-V features. This will allow detection where Hyper-V is in
use for things like ApplicationGuard.

Uses both Get-WindowsOptionalFeature and Get-WindowsFeature to
support check on server and non-server version.
2018-04-27 14:13:34 -07:00
Brian Cain fd3d78746c
(#9717) Improve messaging around not finding requested provider
This commit adds a bit more helpful messaging for the user when asking
for a provider that might not exist or does not follow the correct
casing. If it can find a match on a provider it knows about, it will
suggest it.
2018-04-26 09:43:58 -07:00
Brian Cain 67c3f866dd
(#7886) Add tests and simplify code for continuing on 416 2018-04-25 14:03:24 -07:00
Alexey Kamenskiy f1993dfa19
Fixed minor typo in comment 2018-04-25 09:12:08 -07:00
Alexey Kamenskiy cd3035e5e9
Issue #7885 Don't raise error if response is 416
416 means there is no more bytes to download (which works only with `--continue-at -` of curl)
2018-04-25 09:12:08 -07:00
Brian Cain a9be56b356
Code updates based on PR feedback 2018-04-24 10:04:40 -07:00
Brian Cain daffd87200
Use match over match? for Ruby 2.3 2018-04-20 12:24:32 -07:00
Brian Cain 188fd5d6a6
Split out run methods with Powershell functions 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 4e5e4d0214
Use args setting for run option in trigger 2018-04-20 10:51:38 -07:00
Brian Cain 8451cbf854
Move up location of error message 2018-04-20 10:51:38 -07:00
Brian Cain c35e0a4f9a
Update docs with some basic trigger examples 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 6bf01965de
Fix run command for windows hosts 2018-04-20 10:51:38 -07:00
Brian Cain a5fe84d64f
Fix string translation 2018-04-20 10:51:38 -07:00
Brian Cain 7cdb32f642
Use inclunde? instead of any? for ruby 2.3 2018-04-20 10:51:38 -07:00
Brian Cain 767a315393
Trigger 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 600557ff24
Move strings to translation file 2018-04-20 10:51:38 -07:00
Brian Cain a1e4fe4411
Align how local provisioner looks with shell provisioner 2018-04-20 10:51:38 -07:00
Brian Cain a857056136
Update color for run_remote to match shell provisioner colors 2018-04-20 10:51:38 -07:00
Brian Cain 8b71c24f90
Match properly on guests with trigger filtering 2018-04-20 10:51:38 -07:00
Brian Cain a4faaa1a4d
Provision run_remote using the shell provisioner 2018-04-20 10:51:38 -07:00
Brian Cain fd2878309b
Move exception warnings in run function 2018-04-20 10:51:38 -07:00
Brian Cain e078767b2b
run now supports script files as well as inline scripts 2018-04-20 10:51:38 -07:00
Brian Cain 8b70abd4d0
Send the correct config message to warn 2018-04-20 10:51:38 -07:00
Brian Cain 59965f4fd6
Properly filter triggers 2018-04-20 10:51:38 -07:00
Brian Cain 975b8e774c
Get basic run triggers executing inline scripts 2018-04-20 10:51:38 -07:00
Brian Cain d750169f6e
Add some logging around run and run_remote 2018-04-20 10:51:38 -07:00
Brian Cain 616b0f9ba6
Preserve returning environment after machine action gets called 2018-04-20 10:51:38 -07:00
Brian Cain 48b7c682ad
Use active machine object 2018-04-20 10:51:38 -07:00
Brian Cain 93af398f9e
Update params for NoStageGiven error 2018-04-20 10:51:38 -07:00
Brian Cain bbf4e3c521
Reduce fire trigger methods to a single method 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 6373441ab2
Ensure guest name is a string 2018-04-20 10:51:38 -07:00
Brian Cain 76418b9fcd
Simplify trigger selection 2018-04-20 10:51:38 -07:00
Brian Cain 0e5cd900f8
Add missing param 2018-04-20 10:51:38 -07:00
Brian Cain 1462b3f718
Simplify trigger command filtering 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 4ecf682265
Add basic trigger plugin scaffold 2018-04-20 10:51:38 -07:00
Brian Cain 42419bbd49
Fix rspec tests 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