Chef:grafana社区菜谱错误
Chef: grafana community recipe error
我正在使用厨师超市的以下食谱: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
为什么这不起作用?
一些信息链接:
这是因为尽管pull request已经合并到master中,但是master中的代码并没有发布到supermarket。
根据 this issue 的评论,食谱的所有权可能会转移到副厨师组。
如果您依赖这个最新的代码,您应该从 git 下载它,更改它的版本并推送到您的 chef-server。
您可能希望在 http://community-slack.chef.io/ 上加入 Slack #sous-chefs 频道以获取有关接管过程的更多信息。
我正在使用厨师超市的以下食谱: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
为什么这不起作用?
一些信息链接:
这是因为尽管pull request已经合并到master中,但是master中的代码并没有发布到supermarket。
根据 this issue 的评论,食谱的所有权可能会转移到副厨师组。
如果您依赖这个最新的代码,您应该从 git 下载它,更改它的版本并推送到您的 chef-server。
您可能希望在 http://community-slack.chef.io/ 上加入 Slack #sous-chefs 频道以获取有关接管过程的更多信息。