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"
],
"remote_path" : "/home/centos/test.sh"
},
{
"type": "file",
"source": "{{user `scriptdir`}}",
"destination": "/home/centos/test.properties"
}
]
}
Error: /home/centos/test.properties: No such file or directory
Can anyone please help me in this regard?
Regards
Pradeep