That should work, assuming your python script is executable and have a proper shebang.
On Wed, Jan 9, 2019 at 5:48 PM Ibrahim Buamod <[email protected]> wrote: > It is a question ? how can I run a python script locally > > On Wednesday, January 9, 2019 at 11:44:51 AM UTC-5, Ibrahim Buamod wrote: >> >> Yes .. sorry for the poor presentation >> >> On Wednesday, January 9, 2019 at 11:43:11 AM UTC-5, Rickard von Essen >> wrote: >>> >>> Is that a question? >>> >>> On Wed, Jan 9, 2019, 17:34 Ibrahim Buamod <[email protected] wrote: >>> >>>> run python script in shell-local >>>> >>>> >>>> "provisioners": [ >>>> { >>>> "type": "shell-local", >>>> "environment_vars": ["VM_NAME={{user `Name`}}"], >>>> "execute_command": ["bash", "-c", "{{.Vars}} {{.Script}}"], >>>> "script": "./abc.py" >>>> } >>>> >>>> -- >>>> This mailing list is governed under the HashiCorp Community Guidelines >>>> - https://www.hashicorp.com/community-guidelines.html. Behavior in >>>> violation of those guidelines may result in your removal from this mailing >>>> list. >>>> >>>> GitHub Issues: https://github.com/mitchellh/packer/issues >>>> IRC: #packer-tool on Freenode >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "Packer" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/packer-tool/d4b1d147-50f2-4c23-a6df-9a128ff3f637%40googlegroups.com >>>> <https://groups.google.com/d/msgid/packer-tool/d4b1d147-50f2-4c23-a6df-9a128ff3f637%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- > This mailing list is governed under the HashiCorp Community Guidelines - > https://www.hashicorp.com/community-guidelines.html. Behavior in > violation of those guidelines may result in your removal from this mailing > list. > > GitHub Issues: https://github.com/mitchellh/packer/issues > IRC: #packer-tool on Freenode > --- > You received this message because you are subscribed to the Google Groups > "Packer" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/packer-tool/968b0d86-92ce-44d8-9aec-8d48059c8856%40googlegroups.com > <https://groups.google.com/d/msgid/packer-tool/968b0d86-92ce-44d8-9aec-8d48059c8856%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/packer/issues IRC: #packer-tool on Freenode --- You received this message because you are subscribed to the Google Groups "Packer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CALz9Rt_RX9Z8kC5vPsnxyHJFd02h0Cisci4S5hT5rgves%3DkCUg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
