You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If provisioning fails, the box restart is still performed.
It seems that the run_remote_command_runner method in provisioner.rb never returns an error code > 0 (even if powershell script fails), which is likely the main issue.
The text was updated successfully, but these errors were encountered:
I had to re-instate the use of the sudo shell method to ensure the command is run as an elevated user. This has had a knock-on effect that detecting a valid exit code is now even more difficult than before.
As an example, we now have nicely formatted output but when a command fails we cannot detect it (and color is not red):
==> default: "Running Windows Domain Provisioner"
VERBOSE: Performing the operation "Join in domain 'seek.int'" on target "talentsearchapi".Add-Computer : Computer 'talentsearchapi' failed to join domain 'seek.int'
from its current workgroup 'WORKGROUP' with following error message: Access is
denied.
At C:\tmp\vagrant-windows-domain-runner.ps1:3 char:1
+ Add-Computer -DomainName seek.int -Credential $credentials -NewName
'tsapi7d66ef ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (talentsearchapi:String) [Add-
Computer], InvalidOperationException
+ FullyQualifiedErrorId : FailToJoinDomainFromWorkgroup,Microsoft.PowerShe
ll.Commands.AddComputerCommand
Restarting computer for updates to take effect.
If provisioning fails, the box restart is still performed.
It seems that the
run_remote_command_runner
method inprovisioner.rb
never returns an error code > 0 (even if powershell script fails), which is likely the main issue.The text was updated successfully, but these errors were encountered: