Open maxschommer opened 3 years ago
Did you change any of the permissions on the files? Permission denied sounds like we don't have execute permissions on the script, but I see:
-rwxr-xr-x 1 3523 Oct 15 15:32 install-telegraf
So it looks like the execute permissions are there. And from there, the code is copied to the EC2 instance:
{
"type": "file",
"source": "{{template_dir}}/../../modules/",
"destination": "/tmp/terraform-aws-influx/modules"
}
And then executed:
{
"type": "shell",
"inline": [
"/tmp/terraform-aws-influx/modules/install-telegraf/install-telegraf --version {{user `telegraf_version`}}",
]
}
So my best guess is the execute permissions got lost on your local checkout?
I didn't change any of the file permissions, just checked it out and ran the tutorial. Hmm, I wonder if it's a Windows issue, I'll try from linux and see if the problem persists. Windows doesn't have a notion of permissions, so it might be that "executable" got lost in translation, and might need to be reapplied if coming from Windows.
Ok, after running directly from linux, there were no issues following the same procedure. So I suspect permissions are getting erased in the Windows clone.
I just submitted a PR with a fix, it first converts all of the line endings to from DOS to unix, and then makes the files executable before running them.
Thanks for looking int othis!
When following the examples/tick-ami example, the build finishes with:
Running from Windows 10. I tried changing the inline shell scripts from
"/tmp/terraform-aws-influx/modules/install-telegraf/install-telegraf --version {{user `telegraf_version`}}"
to"sudo /tmp/terraform-aws-influx/modules/install-telegraf/install-telegraf --version {{user `telegraf_version`}}"
and received acommand not found
error: