Closed audioeptesicus closed 2 years ago
You do not need to install the plugin manually, packer init
will do that for you. Please see https://github.com/rgl/packer-plugin-windows-update#usage
I did that as well.
PS C:\Scripts\Packer> packer init .\windows-update-install.pkr.hcl
Installed plugin github.com/rgl/windows-update v0.14.1 in "C:/Users/xxxxxxxxxx/AppData/Roaming/packer.d/plugins/github.com/rgl/windows-update/packer-plugin-windows-update_v0.14.1_x5.0_windows_amd64.exe"
I still get the below error:
Error: Unknown provisioner type "windows-update"
on .\Win2022_Base.pkr.hcl line 129:
(source code not available)
known provisioners: [azure-dtlartifact ansible-local chef-client converge
windows-restart breakpoint sleep shell-local puppet-server chef-solo ansible
inspec shell salt-masterless puppet-masterless windows-shell file powershell]
That is really odd. Its downloading the correct plugin binary, but its not finding it?
Did you double check your .pkr.hcl file plugin definition block?
packer {
required_plugins {
windows-update = {
version = "0.14.1"
source = "github.com/rgl/windows-update"
}
}
}
If you did, you have to check the packer debug logs to see if there's any clue in there.
I'm also experiencing this issue. I have the above code in windowsbase.pkr.hcl, and it installs 0.14.1 fine, but then when I try to execute the packer build, it fails with the same error.
Installed plugin github.com/rgl/windows-update v0.14.1 in "C:/Windows/system32/config/systemprofile/AppData/Roaming/packer.d/plugins/github.com/rgl/windows-update/packer-plugin-windows-update_v0.14.1_x5.0_windows_amd64.exe"
Error: Failed to initialize build "Windows-corp"
error initializing provisioner 'windows-update': Unknown provisioner
windows-update
Running packer 1.8.0 from a Windows 2019 server.
I'm running packer from C:\Scripts\Packer and have the environment variable set. I have placed the packer-plugin-windows-update_v0.14.0_x5.0_windows_amd64.exe plugin in multiple directories (where packer.exe resides, where the .json/.pkr.hcl files are saved, in various plugin directories I have created based on recommended paths) and cannot avoid the error.
The packer log finds the plugins, but does note the following:
What am I doing wrong here?