Hi to all,
I’m facing some problems with a yum_package resource. Actually, what I’m trying
to do is install a package and then configure it. The package is munin-node. My
recipe contains the following resources, in the following order:
yum_package “munin-node” do
not_if "rpm -qa | grep munin-node"
end
template “/etc/munin/munin-node.conf” do
source "munin-node.conf.erb"
mode 0644
end
(chef-version: 10.14.4)
everything worked perfectly, up until yesterday. What happened was, when
running chef-client, the template resource through an exception and exited. The
reason was that the parent directory “/etc/munin/”, which is created when the
packaged is installed, was not found. When running “ls /etc/munin”, the
directory existed. And the next time chef-client ran, everything worked fine.
So, my questions are:
- Does the yum_package resource run in the background?
- When having 2 resources in a recipe, when does the second resource start
executing? I had the impression that it would start execution right after, and
only if, the previous resource completes successfully. What I seem to be
getting here is the template resource starts executing before the yum_package
resource has finished what it is doing.
BTW: I tried using “retries” and “retry_delay” and it did work, but I would
like to understand how things work.
Thanks!!