Jay,
thanks fo ans!
mysql used as an example. call it something different: ololo. It essentially does not change. we need to write own provider, but it's not clear how to do it. documentation is very vague.
On Thu, 26 Jan 2012 09:34:11 -0500, Jay Feldblum wrote:
Ilya,
The lightweight provider goes in:chef-repo/cookbooks/mysql/providers/database.rb
You should also have corresponding lightweight resource, so that you can actually use the lightweight provider, in:
chef-repo/cookbooks/mysql/resources/database.rb
You can use a lightweight resource in another cookbook (Chef will match your lightweight resource to your lightweight provider) by:mysql_database "the-db-name" do# some attributesendFor more complete information about defining and using lightweight resources and providers, consult:- Jay
On Thu, Jan 26, 2012 at 2:21 AM, Ilya Maltsev < "> > wrote:
Hello!
We're trying to write a provider. For example: MySql. It consists of the
following components:
mysql/attributes/default.rb
containing:
default['mysql']['m_version'] = "1.0.0"
mysql/attributes/providers.rb
containing:
action :ololo do
execute "print some" do
puts "Olololo!"
end
end
mysql/resouces/default.rb
containing:
actions :ololo
attribute :ololo, :kind_of => String
After that, we are creating a recipe dump_extract/recipes/default.rb,
containing the following:
include Chef::Provider::Mysql
mysql do
provider "default"
end
After that, we're trying to run dump_extract, but it is impossible to
call the provider Mysql.
Tell me please how to make a call to the provider. The official
documentation contain very little information.
Thank you!
--
Best regards,
Ilya Maltsev
-- Best Regards, Ilya Maltsev
Archive powered by MHonArc 2.6.16.