【发布时间】:2021-11-01 07:27:24
【问题描述】:
我正在尝试使用 Chef 的 PostgreSQL 食谱: https://supermarket.chef.io/cookbooks/postgresql#readme
我收到此错误:
Chef::Exceptions::RecipeNotFound: could not find recipe default for cookbook postgresql
我在 repo 中没有看到 default.rb: https://github.com/sous-chefs/postgresql/find/main
我已将依赖项添加到 Berksfile 和 metadata.rb 并在我的配方中添加:
include_recipe 'postgresql'
我还在我的仓库中添加了一个 default.rb 和 include_recipe 'postgresql'。
仍然一直说没有默认食谱。我在这里遗漏了什么吗?
编辑:
根据 seshadri_c 的回答,这是错误现在消失了。 我正在尝试安装扩展。 在我的 default.rb 中有这个:
postgresql_extension 'postgres adminpack' do
database 'postgres'
extension 'adminpack'
end
但报错
FATAL: NoMethodError: postgresql_extension[postgres adminpack] (******::default line 5) had an error: NoMethodError: bash[CREATE EXTENSION postgres adminpack] (/tmp/packer-chef-solo/local-mode-cache/cache/cookbooks/postgresql/resources/extension.rb line 31) had an error: NoMethodError: undefined method `[]' for nil:NilClass[0m
【问题讨论】:
标签: postgresql chef-infra