- From: Seth Chisamore <
>
- To:
- Subject: [chef] Re: Clear package cache?
- Date: Thu, 28 Oct 2010 00:01:18 -0400
Lee,
Create an execute resource and notify it from the template that creates the yum repo:
execute "yum clean all" do
action :nothing
end
template "/etc/yum.repos.d/random_name.repo" do
notifies :run, resources(:execute => "yum clean all"), :immediately
end
You can also take a look at the APT cookbook since it does something very similar (for "apt-get update"):
They both create an execute resource in the compile phase that is notified and run during the execution phase
Seth
--
Opscode, Inc.
Seth Chisamore, Technical Evangelist
T: (404) 348-0505 E:
" target="_blank">
Twitter, IRC, Github: schisamo
On Wed, Oct 27, 2010 at 11:49 PM, Lee Huffman
<
">
> wrote:
Hello,
I have a recipe that installs a yum repository and then immediately attempts to install packages from that repository. Unfortunately, I'm receiving errors that the package I'm trying to install isn't available.
Chef output:
https://gist.github.com/d0d1316453b3a4cc7d91However, I have no problem installing the package manually.
System output:
https://gist.github.com/2f4ef87eba8bb6d7c5de
I attempted to add the following to the recipe (in between the repository's installation and the package's installation):
execute "yum clean all" do
action :run
end
But continued to receive the same error message. Has anyone experienced this before?
Archive powered by MHonArc 2.6.16.