- From: Phil Dibowitz <
>
- To:
- Subject: [chef] Re: Re: Re: Re: Re: Force recipe to run at the end
- Date: Wed, 26 Sep 2012 00:15:56 -0700
On 09/25/2012 07:02 PM, Julien Vehent wrote:
>
Thanks. I updated the cookbook: http://community.opscode.com/cookbooks/afw
>
One thing that I'm not 100% comfortable with (despite the great help on
>
#chef)
>
is how to export a single function from a given module to other cookbooks.
>
In
>
this case, I have AFW.create_rule() that simply calls the internal function
>
AFWCore.process_rule(). I'm guessing this could be done better, but being
>
primarily a sysadmin/security and not really a rubyist, I'm not sure how.
That's totally fine. I only did a quick scan of the code, but if I read it
correctly, create_rule() is just a wrapper for some sanity checking and then
adding the rule to the node object, right?
That's completely reasonable. That all then gets added a compile time, and at
runtime when your template is processed all the data is there.
Again, I only did a very quick glance at the code, but it seems good in
general.
--
Phil Dibowitz
Open Source software and tech docs Insanity Palace of Metallica
http://www.phildev.net/ http://www.ipom.com/
"Be who you are and say what you feel, because those who mind don't matter
and those who matter don't mind."
- Dr. Seuss
Attachment:
signature.asc
Description: OpenPGP digital signature
Archive powered by MHonArc 2.6.16.