[chef] Re: Re: RE: define same service multiple times


Chronological Thread 
  • From: Koert Kuipers < >
  • To:
  • Subject: [chef] Re: Re: RE: define same service multiple times
  • Date: Tue, 27 Jan 2015 17:10:14 -0500

thanks!

On Tue, Jan 27, 2015 at 4:25 PM, Daniel DeLeo < " target="_blank"> > wrote:


On Tuesday, January 27, 2015 at 1:16 PM, Kevin Keane Subscription wrote:

> RE: [chef] define same service multiple times
>
> I'm not sure exactly what happens, but you can sidestep the issue simply by using two different resource names, and specifying the actual service name with the service_name attribute.
>
>
>
>
>
>
> Kevin Keane
> The NetTech
> http://www.4nettech.com
> Our values: Privacy, Liberty, Justice
> See https://www.4nettech.com/corp/the-nettech-values.html
>
> > -----Original message-----
> > From: Koert Kuipers < "> (mailto: "> )>
> > Sent: Tuesday 27th January 2015 11:47
> > To: "> (mailto: "> )
> > Subject: [chef] define same service multiple times
> >
> > what happens if i define the same service multiple times across recipes?
> >
> > for example:
> > i define it once just so i can have it restart if a template changes (but in that recipe i do not enable or start it)
> >
> > i define it again in another recipe to enable and start it.
> >
> > do these multiple definitions get merged somehow? what if they conflict?
> >
> > thanks! koert

You get a behavior called resource cloning, which triggers a warning (and we’d like to remove sometime, though this is kinda tricky to do). You can read more about that here: https://tickets.opscode.com/browse/CHEF-3694

In any case, you’re best off following Kevin’s advice.

--
Daniel DeLeo







Archive powered by MHonArc 2.6.16.

§