Unable to pass parameter to scripts while packaging in Packer

Dear Team,

“provisioners”: [
“type”: “shell”,
“execute_command”: “echo ‘’ | sudo -S -u root {{ .Vars }} bash ‘{{ .Path }}’”,
“script”: “./packer/scripts/install.sh --cl_name hostname”,
“environment_vars”: [
“DB_HOME={{ user DB_home }}”,"

Is there any way that we can pass parameter to scripts like above. Without passing parameters, above script runs successfull.

Im not a Packer user but looking at the documentation there doesn’t seem to be a way to do that.

Now considering that you want your builds to be reproducible, that argument should always be the same for the same template which makes it redundant, doesn’t it?

If you need to change the argument, instead change the script and create a new template.