Closed sededg closed 4 months ago
It looks like you're setting those variables as environment vars, but the python.py script expects them as arguments rather than env vars.
Recommend closure.
cc @nywilken
Good catch @tenthirtyam, we can indeed close this one since there hasn't been any update for years.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
I am trying to pass arguments on python script using shell provisioner, am i missing anything?
packer --version 1.6.4
Packer code: "provisioners": [ { "type": "shell-local", "script": "python.py", "environment_vars": [ "pyt_name=pytname", "pyt_arch=64-bit" ], "execute_command": [ "/bin/bash", "-c", "{{.Vars}} /usr/bin/python {{.Script}}" ] } Debug log Error: ==> vsphere-clone: usage: python.py [-h] --pyt_name PYT_NAME --pyt_arch PYT_ARCH ==> vsphere-clone: python.py: error: argument --pyt_name is required