- From: John Hanks <
>
- To:
- Subject: [chef] Re: Re: Check for changes in a data bag.
- Date: Thu, 8 Jul 2010 13:52:04 -0400
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=QByhFq4VVIsrG16Rie2EXMq0OFla/b7rcwK3djUkGbkzlzNP9//q6731Ybp6xbbl9E t+IXYn0kzDC8WBXYNod5sApvL1KcCOga8Xvn4ewWqjJaVrXDw0L2DMBHZl1rkJLGoeRs Ms+5Sk+MRg59oJGaXhszSyYzRZPHLJPux3D3w=
On Thu, Jul 8, 2010 at 10:31 AM, Seth Falcon
<
>
wrote:
>
1. There is a package resource that will use an appropriate package
>
provider based on the OS (yum is the default for Redhat and CentOS). If
>
you haven't tried it, you might try using that instead of executing yum
>
directly. One advantage is to make your recipes easier to port to other
>
Linux flavors.
This would be ideal, except that the package resource only supports
rpms, not 'yum groupinstall'. I get away with a much shorter list of
individual rpms to maintain by using groups. Ideally I'd add
groupinstall support to the yum provider, but I'm not that chef-smart
yet.
>
2. A common pattern is to simply rerun and let the resources figure out
>
if work needs to be done (in this case package installs). And the
>
package resource should do a reasonable job of only doing the
>
installation work if the requested package is not already installed.
I think this is common most likely because it makes sense. For now I'm
going to just let yum rerun for each chef-client run. If I decide to
try to make it fancy then I'll tackle adding groupinstall support to
the yum package resource.
jbh
Archive powered by MHonArc 2.6.16.