- From: Cooper Simmons <
>
- To:
- Subject: [chef] How to set excludes in yum cookbook?
- Date: Tue, 29 May 2012 20:39:39 -0500
Hello.
I would like to exclude certain packages in my yum.conf file but I can't figure out how to do it with the Opscode yum cookbook.
I see this in attributes/default.rb:
# Example: override.yum.exclude = "kernel* compat-glibc*"
default[:yum][:exclude]
And this in templates/default/yum-rhel6.conf.erb:
<%- if node[:yum][:exclude] %>
exclude=<%= node[:yum][:exclude].join(" ") %>
<%- end %>
I tried putting this in the attributes:
default[:yum][:exclude] = "kernel*"
But that didn't do anything.
Not sure where to put the override.
But that gave me a fatal error:
FATAL: Chef::Mixin::Template::TemplateError: undefined method `join' for "kernel*":String
Can anyone tell me how to add excludes to the yum.conf file with the yum cookbook?
Thanks,
Cooper
- [chef] How to set excludes in yum cookbook?, Cooper Simmons, 05/29/2012
Archive powered by MHonArc 2.6.16.