我使用厨师超市的以下食谱:https://supermarket.chef.io/cookbooks/grafana
当我尝试执行以下代码时,它会崩溃:
grafana_user 'lechucico' do
user(
name: 'lechucico',
email: 'lechucico@example.com',
password: 'lechu',
isAdmin: true,
organizations: [
{ name: 'Administration', role: 'Admin' },
{ name: 'Marketing', role: 'Admin' }
]
)
action :create
end
此错误引发:
Chef::Exceptions::ValidationFailed
==> default: ----------------------------------
==> default: Option user must be a kind of [String]! You passed {"name"=>"lechucico", "email"=>"lechucico@example.com", "password"=>"lechu", "isAdmin"=>true, "organizations"=>[{"name"=>"Administration", "role"=>"Admin"}, {"name"=>"Marketing", "role"=>"Admin"}]}.
==> default:
==> default: Cookbook Trace:
==> default: ---------------
==> default: /var/chef/cache/cookbooks/living-grafana/recipes/default.rb:50:in `block in from_file'
==> default: /var/chef/cache/cookbooks/living-grafana/recipes/default.rb:49:in `from_file'
==> default:
==> default: Relevant File Content:
==> default: ----------------------
==> default: /var/chef/cache/cookbooks/living-grafana/recipes/default.rb:
==> default:
==> default: 43: # )
==> default: 44: # action :update
==> default: 45: #end
==> default: 46:
==> default: 47: grafana_organization 'Marketing'
==> default: 48:
==> default: 49: grafana_user 'lechucico' do
==> default: 50>> user(
==> default: 51: 'name' => 'lechucico',
==> default: 52: 'email' => 'lechucico@example.com',
==> default: 53: 'password' => 'lechu',
==> default: 54: 'isAdmin' => true,
==> default: 55: 'organizations' => [
==> default: 56: { 'name' => 'Administration', 'role' => 'Admin' },
==> default: 57: { 'name' => 'Marketing', 'role' => 'Admin' }
==> default: 58: ]
==> default: 59: )
==> default:
==> default: Platform:
==> default: ---------
==> default: x86_64-linux
为什么这不起作用?
一些信息链接:
答案 0 :(得分:1)
这是因为尽管拉请求已合并到主服务器中,但主服务器中没有释放代码到超市。
根据this issue的评论,食谱的所有权很可能转移到sous-chef组。
如果你依赖这个最新的代码,你应该从git下载它,更改它的版本并推送到你的主厨服务器。
您可以在http://community-slack.chef.io/加入Slack#sous-chefs频道,了解有关收购过程的更多信息。