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
roar-alpha@localhost:~/packer-build/source/ubuntu/22.04_jammy$ packer build base.pkr.hcl
Error: Error in function call
on base.pkr.hcl line 305:
(source code not available)
with var as object with 52 attributes,
var.user_data_location as "user-data".
Call to function "templatefile" failed: user-data:119,20-29: Unsupported
attribute; This object does not have an attribute named "username"., and 1 other
diagnostic(s).
Error: Error in function call
on base.pkr.hcl line 364:
(source code not available)
with var as object with 52 attributes,
var.user_data_location as "user-data".
Call to function "templatefile" failed: user-data:119,20-29: Unsupported
attribute; This object does not have an attribute named "username"., and 1 other
diagnostic(s).
22.04 packer template fails to build may I know how should I debug this?
The text was updated successfully, but these errors were encountered:
Sorry you ran into a bug but it seems like you're willing to help fix them (thanks). I confess that I don't really use these templates anymore but I'm certainly willing to merge fixes since there might still be folks out there using these (so maybe I'm not quite ready to "archive" this repo).
First off, I'm not too sure which version of HashiCorp Packer you are using, nor what kind of a system you're trying to run this on (in case this issue turns out to be related to that). Second, you should probably confirm what version of VirtualBox or QEMU/libvirt you're trying to use too.
I have neglected to update the https://github.com/tylert/packer-build#using-packer-templates section of the README the last time I tried to finish the conversion from my old YAML-based templates and the instructions for doing this using the HCL2-based templates were quite a bit different. As I said, I'm not really using this repo these days but I'm willing to merge in pull-requests to help improve the README.
You might also try passing in the -only=qemu or -only=vbox options to packer build if you're aiming to work with only one of the builders.
I hope these instructions help set you back on the path to a solution quickly. I'm going to leave this issue open until someone has a chance to put up a pull-request or you can confirm things work better with a newer version of Packer.
22.04 packer template fails to build may I know how should I debug this?
The text was updated successfully, but these errors were encountered: