- From: Matt Ray <
>
- To:
- Subject: [chef] Re: Re: Re: Recipe management
- Date: Fri, 4 May 2012 10:10:27 -0500
Ideally your recipes shouldn't be that different between platforms, so
a few conditional blocks keying off of platform is generally more
sustainable. Trying to keep parallel paths for different platforms
isn't a very DRY approach. That said, you could use an include_recipe
keying off of the platform to break out just those specific pieces and
come back into the main flow is probably a better approach. Take a
look at how the annoyances cookbook works:
https://github.com/mattray/annoyances-cookbook/blob/master/recipes/default.rb#L20
Thanks,
Matt Ray
Senior Technical Evangelist | Opscode Inc.
| (512) 731-2218
Twitter, IRC, GitHub: mattray
On Fri, May 4, 2012 at 10:00 AM, Maven User
<
>
wrote:
>
Yeah, digging deeper, it seems like people have asked for this same
>
feature. Just stinks trying to support multiple platforms (both *nix AND
>
windows) and multiple architectures on each.
>
>
Just for a simple jdk installation, that becomes all these if or case blocks
>
whereas it'd be much nicer to use libraries+attributes and segregate the
>
recipes based on platform/architecture just like the files.
>
>
Is that nuts?
>
>
>
On Fri, May 4, 2012 at 10:55 AM, Matt Ray
>
<
>
>
wrote:
>
>
>
> I believe you've "got your wires crossed" with templates and files.
>
>
>
> http://wiki.opscode.com/display/chef/File+Distribution#FileDistribution-FileSpecificity
>
>
>
> Thanks,
>
> Matt Ray
>
> Senior Technical Evangelist | Opscode Inc.
>
>
>
> | (512) 731-2218
>
> Twitter, IRC, GitHub: mattray
>
>
>
>
>
> On Fri, May 4, 2012 at 9:44 AM, Maven User
>
> <
>
>
> wrote:
>
> > Hi all -
>
> >
>
> > Super quick - I could have SWORN there was a way to segregate your
>
> > recipes
>
> > by folder named after the platform you're targeting.
>
> >
>
> > I can't seem to find that document page and I'm really trying to
>
> > minimize
>
> > what the recipe has in it for a given platform.
>
> >
>
> > Anyone know what I'm talking about here or do I have my wires crossed
>
> > with
>
> > another part of chef?
>
>
Archive powered by MHonArc 2.6.16.