0

I need to change the directory where packer runs the AMI provisioning script from /tmp/packer-shell975270284 because our instances don't allow scripts to be run form /tmp.

This script needs to run in /opt or /home/ec2-user. where it will have permissions

Below is the error that I am getting after the ansible playbook ran.

==> amazon-ebs: Provisioning with shell script: /tmp/packer-shell975270284
Build 'amazon-ebs' errored: Error uploading script: scp: /tmp/script_5412.sh: Permission denied.

==> Some builds didn't complete successfully and had errors.

==> Builds finished but no artifacts were created.
Mpho Mokgosi
  • 35
  • 1
  • 2
  • 10

1 Answers1

1

You need to set the remote_folder to something else rather than /tmp. See the documentation.

Robbie JW
  • 729
  • 1
  • 9
  • 22
Rickard von Essen
  • 4,110
  • 2
  • 23
  • 27