[chef] RE: Including other recipes ... why the alternate format/method?


Chronological Thread 
  • From: "Justin Witrick" < >
  • To:
  • Subject: [chef] RE: Including other recipes ... why the alternate format/method?
  • Date: Wed, 12 Mar 2014 12:52:33 -0400 (EDT)
  • Importance: Normal

So in this case they are not including a recipe named 'Password' they are including a module named 'Password'

 

The module is defined in: https://github.com/opscode-cookbooks/openssl/blob/master/libraries/secure_password.rb

 

 

-----Original Message-----
From:
Sent: Wednesday, March 12, 2014 12:17pm
To:
Subject: [chef] Including other recipes ... why the alternate format/method?

Greetings,

I am looking at a recipe for installing tomcat and happened across this line
(with associated comment):

# required for the secure_password method from the openssl cookbook
::Chef::Recipe.send(:include, Opscode::OpenSSL::Password)

I was wondering why the author would choose to use this alternate way of
including a recipe. Why would they not just do something like: include_recipe
'X::Password'.

Is this not doing exactly that, simply including another recipe? If so, then
why choose the more difficult to read/maintain/etc way of doing it?

Thanks in advance for the insight!




Archive powered by MHonArc 2.6.16.

§