Issue choosing the wrong template file
Hey Erik, I do have the issue when adding a .pkvars.hcl file into the template directory that running ludus templates build runs sometimes the .pkvars.hcl file which crashes because it is not a correct main template file.
PACKER_PLUGIN_PATH=/opt/ludus/resources/packer/plugins PKR_VAR_proxmox_password=xxxxxxxxxx PACKER_CONFIG_DIR=/opt/ludus/users/patrick-e/packer PACKER_CACHE_DIR=/opt/ludus/users/patrick-e/packer/packer_cache CHECKPOINT_DISABLE=1 PACKER_LOG=1 PACKER_LOG_PATH='/opt/ludus/users/patrick-e/packer.log' TMPDIR='/opt/ludus/users/patrick-e/packer/tmp' packer build -on-error=cleanup -var 'proxmox_url=https://127.0.0.1:8006/api2/json' -var 'proxmox_host=ludus' -var 'proxmox_username=patrick-e@pam' -var 'proxmox_skip_tls_verify=true' -var 'proxmox_pool=SHARED' -var 'proxmox_storage_pool=local' -var 'proxmox_storage_format=qcow2' -var 'iso_storage_pool=local' -var 'ansible_home=/opt/ludus/users/patrick-e/.ansible' -var 'ludus_nat_interface=vmbr1000' /opt/ludus/users/patrick-e/packer/win11-24h2-x64-enterprise-tpm/.pkrvars.hcl
Failed to parse file as legacy JSON template: if you are using an HCL template, check your file extensions; they should be either *.pkr.hcl or *.pkr.json; see the docs for more details: https://www.packer.io/docs/templates/hcl_templates.
Original error: Error parsing JSON: invalid character 'p' looking for beginning of value
At line 1, column 1 (offset 1):
1: p
^
exit status 1
The intention is to use a user with an API token for packer since my potato server takes more than 2 hours for building, which apparently results in an expiry of the PVE ticket.
Edited by Secdude