chef-cookbooks / chef-server

Cookbook to install standalone Chef Server

Home Page:http://supermarket.chef.io/cookbooks/chef-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

addon attribute

mistroh opened this issue · comments

Hello,
I'm a little confused on how to add addon attributes in the cookbook. What is the format/syntax that the addon attribute should be listed in in the cookbook?

For example, I'm trying to add the 'manage' addon to my Chef Server. I see that the recipe is supposed to iterate through the node.default['chef-server']['addons'] attribute, but what format (how should I have) the addons listed in the code block?

For example, the documentation shows how to configure the Chef Server configuration attributes (shown below), but I don't know how to configure the Addon attributes.

node.default['chef-server']['configuration'] = <<-EOS
  notification_email '##########'
  api_fqdn '#{node["fqdn"]}'
EOS

For addons, I'm assuming it's in a similar format as shown below, but could someone please guide me on the correct syntax/format for adding an addon attribute?

node.default['chef-server']['addons'] = <<-EOS
  #add manage addon here
EOS

Thanks.

I believe I found the solution. You use the chef-ingredient cookbook to install the add-on and reconfigure the Chef Server

chef_ingredient 'manage' do
  channel :current
  action :install
end

chef_ingredient 'manage' do
  notifies :reconfigure, 'chef_ingredient[manage]'
end