[chef] Re: Re: Application cookbook refactoring


Chronological Thread 
  • From: Joshua Timberman < >
  • To:
  • Subject: [chef] Re: Re: Application cookbook refactoring
  • Date: Mon, 23 Apr 2012 10:17:36 -0600

Hello,

On Mon, Apr 23, 2012 at 7:20 AM, Millisami 
< >
 wrote:
> So, how to pass the data_bag items to this refactored dsl of application
> cookbook?

You can load the data bag item directly and then use values from it to
populate the parameters in the new application resource(s). Something
like this:

    app = data_bag_item(:apps, "my_app")

    application app['id'] do
      path app['deploy_to']
      owner app['owner']
      group app['group']
      repository app['repository']
      reivision app['revision']
      migrate app['migrate']
      packages app['packages'].keys
      rails do
        database do
          database app['database']['name']
          username app['database']['username']
          password app['database']['password']
        end
      end
    end

-- 
Opscode, Inc
Joshua Timberman, Technical Program Manager
IRC, Skype, Twitter, Github: jtimberman



Archive powered by MHonArc 2.6.16.

§