[chef] application_ruby database block and attributes


Chronological Thread 
  • From: Cassiano Leal < >
  • To:
  • Subject: [chef] application_ruby database block and attributes
  • Date: Wed, 10 Jul 2013 14:19:22 -0300

Hi,

How do I pass parameters (preferably via attributes) to the database block in the application_ruby cookbook?

What I want to do is something like:

application “my_app” do
  ...
  rails do
  ...
    database do
      username node[:my_app][:db_user]
      password node[:my_app][:db_password]
    end
  end
end

It looks like the database block does not have access to the node object.

I have the application resource inside a definition, so I also tried to pass parameters to it, like params[:db_user], but that does not work either.

How do I set those database parameters dynamically?

Cheers,
Cassiano Leal




Archive powered by MHonArc 2.6.16.

§