Thank you for the reply! You wouldn't happen to have a couple examples of templates/scripts that use the environment vars in the way you describe, would you?
On Friday, October 5, 2018 at 12:59:06 AM UTC-7, Rickard von Essen wrote: > > You can modify 1) execute_command to pass arguments, but a better way is > to pass information via environemnt_vars 2) because then you can run all > you scripts in the same powershell provisioner. > > 1) https://packer.io/docs/provisioners/powershell.html#execute_command > 2) https://packer.io/docs/provisioners/powershell.html#environment_vars > > On Fri, Oct 5, 2018 at 12:57 AM goffries <goff...@gmail.com <javascript:>> > wrote: > >> Is there a way to pass arguments to a script using the powershell >> provisioner without using Inline? >> >> example. >> >> { >> "type": "powershell", >> "script": "D:\\Scripts\\windows-vscodeinstall.ps1 -version >> {{user `version` }}" >> } >> >> -- >> 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 packer-tool...@googlegroups.com <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/packer-tool/dd57eb14-bcc6-403f-84e5-14ce22eae468%40googlegroups.com >> >> <https://groups.google.com/d/msgid/packer-tool/dd57eb14-bcc6-403f-84e5-14ce22eae468%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 packer-tool+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/fcafcfdd-09c9-4094-bb29-ef9d1b2cd351%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.