- From: "Wolfe, Eric G" <
>
- To: "
" <
>
- Subject: [chef] Re: How to set excludes in yum cookbook?
- Date: Wed, 30 May 2012 01:58:59 +0000
- Accept-language: en-US
Pretty sure it is an array attribute. So you need to put something like
..yum.exclude = [ "kernel*" ] in your role. It used to be a default of the
recipe, if I am not mistaken.
sent from my phone, excuse any nonsensical autocorrect stuff.
Cooper Simmons
<
>
wrote:
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.
I tried putting this in the role override_attributes:
https://gist.github.com/2832357
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
Archive powered by MHonArc 2.6.16.