Even when preforming config only, the install flags (i.e. -M, -S, -N),
are used by the bootstrap to determine which configs to copy.
This should help with #3542 and should supersede #3548.
There's very little difference between the command building on Linux and Windows other than path formatting. All Chef provisioners support the --no-color argument now.
Added unit tests to verify changes.
CommandBuilderWindows would not include the Chef binary in the command when the binary_path was specified in the config.
Backfilled unit tests for CommandBuilderWindows
This script creates an immediately run scheduled task using fresh credentials. This is a generic implementation used by the Chef provisioners. The script gets around several limitations in WinRM.
1. Credential hopping
2. The non-default Administrator account sometimes doesn't have true Administrator access when run through WinRM even with UAC disabled.
In short, this script allows commands to run through WinRM just as if they were run directly on the box.
Currently, interrupting 'vagrant rsync-auto' once it's waiting for
filesystem events has no effect. Appears to be a deadlock related to
signal handlers in Ruby 2.0 [0].
Remove call to `thread.join` in signal handler. The handler doesn't
need to wait for `true` to be added to the queue; it just needs to
launch the thread.
[0]: https://bugs.ruby-lang.org/issues/7917
Run remote rsync as root to guarantee that rsync can write to guestpath.
This obviates the need to chown the guestpath to the SSH user prior to
sync.
This brings a substantial speedup (2x on a moderately-sized shared
folder) and properly triggers filesystem notifications on only the files
changed by a given sync.
*nix commands are now filtered out instead of being sent to the guest. This means the command_alias PowerShell script is no longer needed.
Moved the PowerShell exit code helper to the WinRM shell and changed it to always return an exit code.
These will be used to replace the guest side command_alias script that is sent with every communicator execute call. This avoids some uncessary remote calls to the guest, makes it unit testable, and allows larger PowerShell commands to be invoked.