【发布时间】:2018-06-20 21:01:16
【问题描述】:
我想在下面的远程文件配方中使用 AWS S3 存储桶,这样 每当有人更改 /tmp/fileA.txt。 chef 客户端将运行以下代码并将 fileA 替换为来自 AWS S3 存储桶的原始 file_Source.txt。
remote_file '/tmp/fileA.txt' do
source 'https://awsS3bucketname/file_Source.txt'
aws_access_key "mykey"
aws_secret_key "mykey"
action :create
end
但是当我运行上面的代码时,我得到 ERROR: undefined method `aws_access_key'。
[2018-06-20T07:04:25-04:00] ERROR: Running exception handlers
Running handlers complete
[2018-06-20T07:04:25-04:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 04 seconds
[2018-06-20T07:04:25-04:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2018-06-20T07:04:25-04:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2018-06-20T07:04:25-04:00] ERROR: undefined method `aws_access_key' for Chef::Resource::RemoteFile
[2018-06-20T07:04:25-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
【问题讨论】: