- From: John Alberts <
>
- To:
- Subject: [chef] shef fails to run if I use a run_action
- Date: Thu, 21 Apr 2011 14:52:54 -0500
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Tdf1yym46PZXAeqlPdNQA979VibeeUg3dADRmXak5yonZeaUg8wWrxr2yVa5Ac7sqm vCcbK0Y1tamjpGioPiidMPLjlIkRhDELpxcuxJzJP2Rf4gDvXtC4BPtWrb4mlQ3Mstn1 2oMP8q9dBW6jUeRd/OS+S+DhFmcIcdeBzqTNk=
I've found a need to use run_action in one of my cookbook recipes to ensure that a particular file is created before chef moves on. It seems this breaks the ability to use shef, which sucks, because I use it all of the time for debugging, etc.
This is the code that shef error out on.
e = template "/etc/sysconfig/exlsysteminfo" do
source "exlsysteminfo.erb"
mode "0644"
action :nothing
variables(
:cnames => `host #{node.ipaddress} | grep -v 'NXDOMAIN' | awk '{print $5}'`.split
)
end
e.run_action(:create)
I have a gist of this code and error messages from shef versions 0.9.12, 0.9.14, 0.9.16. I noticed 0.9.12 has a more informative error message than newer releases and helped me track the problem down to this section of code.
Here is the gist: https://gist.github.com/54e6f39586219aac0307
Any idea what I can do to get shef to work again?
--
John Alberts
- [chef] shef fails to run if I use a run_action, John Alberts, 04/21/2011
Archive powered by MHonArc 2.6.16.