如何将打包程序运行AMI设置脚本的目录从/ tmp更改为/ opt

时间:2019-09-06 11:33:49

标签: packer packer-builder

我需要从/ tmp / packer-shell975270284更改打包程序运行AMI设置脚本的目录,因为我们的实例不允许以/ tmp形式运行脚本。

此脚本需要在/ opt或/ home / ec2-user中运行。它将拥有权限的地方

下面是可笑的剧本运行后出现的错误。

==> 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.

1 个答案:

答案 0 :(得分:0)

您设置了remothe_folder,请参见the docs