- From: Adam Jacob <
>
- To:
- Subject: [chef] Re: Issues with Template Files after upgrading to Chef 10.6
- Date: Wed, 14 Dec 2011 20:47:05 -0800
I see a bug in your code - environment should probably be
node.chef_environment == "int_environment"?
Adam
---
Opscode, Inc.
Adam Jacob, Chief Customer Officer
T: (206) 619-7151 E:
On Dec 14, 2011, at 8:40 PM, Zuhaib Siddique wrote:
>
So for some reason the following block of code stop working in Chef 10.6 on
>
a ubuntu server:
>
>
template "/tmp/oxygen/properties.map" do
>
source "INT.properties.map.erb"
>
owner "root"
>
group "root"
>
mode 0644
>
variables(
>
:webname => node[:hostname],
>
:mysql_password => "#{mysql_pass}",
>
:data_db => "DB_Host",
>
:rs_db => "DB_HOST",
>
:weblink => "URL"
>
)
>
only_if {environment == "int_environment"}
>
end
>
>
but if I change the following:
>
>
template "/tmp/properties.map" do
>
>
it starts working. Now the folder its uploaded too is created by chef:
>
>
FileUtils.mkdir_p("/tmp/oxygen/")
>
>
But on the system I am testing the recipe on I made the directory manually
>
yet still it won't upload the file. From the log it looks like it just
>
skips over template like the if condition does not match but thats not the
>
case. The weird thing is on another system that has 10.4 installed it
>
works as expected. The only change has been upgraded to 10.6 on my
>
personal system that I run knife on (and in turn the new systems get 10.6).
>
>
Zuhaib
Archive powered by MHonArc 2.6.16.