Open Thumpermat opened 6 years ago
This is really weird. By all rights this ticket feels like it should be a duplicate of https://github.com/hashicorp/packer/issues/5752 and therefore should have been solved with https://github.com/hashicorp/packer/pull/5763 . But I assume from your comment on your other issue that you're on master for this build.
I'm linking your originating issue just for ease of connecting the dots on this chef-solo weirdness. https://github.com/hashicorp/packer/issues/5726
I re-tested with SSH and WinRM and confirm that with Packer 1.1.4 it works with SSH and crashes with WinRM
Reproduced using the repo provided in #5726
Hello,
Got the same error with Packer v1.3.4, WinRM and Chef-Solo provisioner.
SyntaxError
-----------
c:/windows/temp/packer-chef-solo/local-mode-cache/cache/cookbooks/windows-hardening/recipes/user_rights.rb:1: invalid multibyte char (UTF-8)
The recipe is empty.
Any updates on the issue?
Sorry, I haven't taken a deeper dive past reproducing because the Chef provisioner is one of our community supported ones. (Community-supported means that normally the HashiCorp engineers don't spend much engineering time on them, apart from reviewing pull requests). If this is affecting you, the fastest way to get it fixed is probably to investigate on your own and make a PR.
See the following log: https://gist.github.com/Thumpermat/fee9942e3f08843e75646f07e6b21c9c
The error is as follows:
The issue is the the recipe user_rights.rb is actually an empty file. When I disable this recipe from the cookbook, it works.
This by the way works without an itch when provisioning with SSH