packer-builder-vsphere
packer-builder-vsphere copied to clipboard
vsphere-iso builder: build_name and packer_version functions not resolving correctly
Using the jetbrains vsphere-iso builder, several of the functions are not being expanded to what is documented. Specifically, build_name and packer_version are not what I'd expect.
build_name - vsphere-iso build_type - vsphere-iso packer_version - 1.3.3
I'd expect the build_name to be what was defined in the json file, and the packer_version should be 1.4.3.
Or could this be issues with the underlying builder: vsphere-iso? I'm not sure where this is resolved.
If I've missed something, then I'm happy to raise a jetbrains issue or try something else out.
Thanks.
-Chris
[dev-user@centos-7-dev Centos]$ packer version Packer v1.4.3 [dev-user@centos-7-dev Centos]$
and it's a Centos 7.6 host.
The full log is here:
https://gist.github.com/ChrisGWarp/d27982f1c04a40cac928bc7cac277b00
The snippet from the template:
"builders": [ { "type": "vsphere-iso",
"vcenter_server": "{{ user vcenter_server
}}",
"username": "{{ user vcenter_username
}}",
"password": "{{ user vcenter_password
}}",
"insecure_connection": "{{ user vcenter_insecure
}}",
"datacenter": "{{ user vcenter_datacenter
}}",
"vm_name": "{{ user vm_name
}}",
"folder": "{{ user vcenter_folder
}}",
"cluster": "{{ user vcenter_cluster
}}",
"host": "{{ user vcenter_host
}}",
"resource_pool": "{{ user vcenter_resource
}}",
"datastore": "{{ user vcenter_datastore
}}",
"notes": "build_name - {{build_name}}\nbuild_type - {{build_type}}\npwd - {{pwd}}\ntemplate_dir - {{template_dir}}\ntimestamp - {{timestamp}}\nuuid - {{uuid}}\npacker_version - {{packer_version}}\n\nBuilt by Packer {{packer_version}} on {{isotime "2006-01-02 at 03:04:05 -0700"}}\nusername : root\npassword : password\n",
It's the notes field that I'm interested in. The generated notes for the VM do not seem to be what I'm expecting from the documentation.
It appears that the values are being hard coded from the builder, rather than as a pre-processor from Packer.