2016-07-01 9 views
3

シェフの初心者である私は、ssh_authorized_keysをAmazon OpsWorksで使用するのに苦労しています。新しいインスタンスを起動すると、次のエラーが発生します。Amazon OpsWorksでssh_authorized_keys外部料理ブックを使用する

[2016-07-01T10:02:37+00:00] INFO: HTTP Request Returned 412 Precondition Failed: 
No such cookbook: ssh_authorized_keys 

================================================================================ 
Error Resolving Cookbooks for Run List: 
================================================================================ 

Missing Cookbooks: 
------------------ 
No such cookbook: ssh_authorized_keys 

Expanded Run List: 
------------------ 
* chef-provisioning::default 

動作させるには何を変更する必要がありますか?

name 'chef-provisioning' 
maintainer 'abc' 
maintainer_email '[email protected]' 
license 'all_rights' 
description 'Installs/Configures chef-provisioning' 
long_description 'Installs/Configures chef-provisioning' 
version '0.1.0' 
depends 'ssh_authorized_keys' 

答えて

2

metadata.rb

source 'https://supermarket.chef.io' 
cookbook 'ssh_authorized_keys', '~> 0.3.0' 

Berksfileキーはディレクトリ構造である:

は、私は次のconfigsを使用します。 ssh_authorized_keys料理本は、自分の料理本ops-works(通常のレシピを保持する)と同じディレクトリになければなりません。

$ tree -d 
. 
├── ops-works 
│   ├── recipes 
│   ├── spec 
│   │   └── unit 
│   │    └── recipes 
│   └── test 
│    └── integration 
│     ├── default 
│     │   └── serverspec 
│     └── helpers 
│      └── serverspec 
└── ssh_authorized_keys 
    ├── attributes 
    ├── definitions 
    ├── libraries 
    └── templates 
     └── default 

Berksfile

source 'https://supermarket.chef.io' 
cookbook 'ssh_authorized_keys' 
私は berks vendorを使用することをお勧めする

Failing To Find Chef Community Cookbooks Using Chef 12 On AWS Opsworks

を見てみました
関連する問題