[chef] how to interchange data between different recipes on open source chef


Chronological Thread 
  • From: Sam Su < >
  • To:
  • Subject: [chef] how to interchange data between different recipes on open source chef
  • Date: Tue, 10 Sep 2013 11:12:47 +0800

Hi,

I have two recipes my open source chef server and need to interchange some data between them. I wondering how to do that. If someone give a hint, it will much appreciated.

PS: I tried to write the data into a databag, but failed as below. It looks like recipes save data into a databag is allowed.

Net::HTTPServerException
------------------------
405 "Method Not Allowed"


Cookbook Trace:
---------------
  /var/chef/cache/cookbooks/mysql/recipes/server.rb:34:in `from_file'


Relevant File Content:
----------------------
/var/chef/cache/cookbooks/mysql/recipes/server.rb:

 30: 
 31:  #if Chef::DataBag.list.key?('unique_name')
 32:    new_databag = Chef::DataBag.new
 33:    new_databag.name('unique_name')
 34>>   new_databag.save
 35:  #end
 36: 


Thanks,
Sam




Archive powered by MHonArc 2.6.16.

§