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 <[email protected]> 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 [email protected].
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt-zheCWLcYq-yM-VVgdGCJUajB-yuc23QrX8C4-zEgg4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to