我需要更改 packer 从 /tmp/packer-shell975270284 运行 AMI 配置脚本的目录,因为我们的实例不允许从 /tmp 运行脚本。
此脚本需要在 /opt 或 /home/ec2-user 中运行。它将在哪里获得权限
以下是我在运行 ansible playbook 后遇到的错误。
==> 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.