Hi all,

I want to run a script with argument like test.sh <test.properties> when 
packer gets executed. 

I am having problem uploading the script file from the current path to the 
remote ec2 instance.
"variables": {
"scriptdir" : "/home/centos"
}
"provisioners": [
{ "type": "shell", "execute_command": "{{.Vars}} sudo -E -S bash 
'{{.Path}}'", "scripts": [ "scripts/test.sh 
<https://www.youtube.com/redirect?q=http%3A%2F%2Ftest.sh%2F&redir_token=LcdgU-fY-jI8umEDXfhzdKcFFD58MTUzODQyNDE0NEAxNTM4MzM3NzQ0&event=comments>
" ], "remote_path" : "/home/centos/test.sh 
<https://www.youtube.com/redirect?q=http%3A%2F%2Ftest.sh%2F&redir_token=LcdgU-fY-jI8umEDXfhzdKcFFD58MTUzODQyNDE0NEAxNTM4MzM3NzQ0&event=comments>
" }, { "type": "file", "source": "{{user `scriptdir`}}", "destination": 
"/home/centos/test.properties 
<https://www.youtube.com/redirect?q=http%3A%2F%2Ftest.properties%2F&redir_token=LcdgU-fY-jI8umEDXfhzdKcFFD58MTUzODQyNDE0NEAxNTM4MzM3NzQ0&event=comments>
" } ] }

Error: /home/centos/test.properties: No such file or directory 
Can anyone please help me in this regard?

Regards
Pradeep

-- 
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/d434156c-e026-44cc-a566-b230c470d2d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to