or maybe i’m doing something silly and don’t see it yet…
i have a recipe that downloads and unpacks a tarball. my intention for
this is to have it download only if the target directory does not
exist on the node. but what’s happening is, the tarball gets downloaded
on each run.
am i using “not_if” correctly below? any suggestions?
thanks!
kallen
if File.directory?("/usr/java/jdk#{java_version}.hoight.#{m_arch}")
after the first run, the above line is true
Chef::Log.debug(“HIGGS-BOSON: dir exists: /usr/java/jdk#{java_version}.hoight.#{m_arch}”)
end
execute “install_jdk_tarball” do
user "root"
cwd "/usr/java"
command “curl -s http://#{depot}/depot/jdk#{java_version}.hoight.#{m_arch}.tgz | tar zxf -“
not_if {File.directory?(”#{java_home}/jdk#{java_version}.hoight.#{m_arch}”)}
end
or maybe i'm doing something silly and don't see it yet..
i have a recipe that downloads and unpacks a tarball. my intention for
this is to have it download only if the target directory does not
exist on the node. but what's happening is, the tarball gets downloaded
on each run.
am i using "not_if" correctly below? any suggestions?
thanks!
kallen
if File.directory?("/usr/java/jdk#{java_version}.hoight.#{m_arch}")
after the first run, the above line is true
Chef::Log.debug("HIGGS-BOSON: dir exists: /usr/java/jdk#{java_version}.hoight.#{m_arch}")
end
execute "install_jdk_tarball" do
user "root"
cwd "/usr/java"
command "curl -s http://#{depot}/depot/jdk#{java_version}.hoight.#{m_arch}.tgz | tar zxf -"
not_if {File.directory?("#{java_home}/jdk#{java_version}.hoight.#{m_arch}")}
end
--
Opscode, Inc.
Adam Jacob, Chief Customer Officer
T: (206) 619-7151 E: adam@opscode.com
or maybe i'm doing something silly and don't see it yet..
i have a recipe that downloads and unpacks a tarball. my intention for
this is to have it download only if the target directory does not
exist on the node. but what's happening is, the tarball gets downloaded
on each run.
am i using "not_if" correctly below? any suggestions?
thanks!
kallen
if File.directory?("/usr/java/jdk#{java_version}.hoight.#{m_arch}")
after the first run, the above line is true
Chef::Log.debug("HIGGS-BOSON: dir exists: /usr/java/jdk#{java_version}.hoight.#{m_arch}")
end
execute "install_jdk_tarball" do
user "root"
cwd "/usr/java"
command "curl -s http://#{depot}/depot/jdk#{java_version}.hoight.#{m_arch}.tgz | tar zxf -"
not_if {File.directory?("#{java_home}/jdk#{java_version}.hoight.#{m_arch}")}
end
--
Opscode, Inc.
Adam Jacob, Chief Customer Officer
T: (206) 619-7151 E: adam@opscode.com
or maybe i'm doing something silly and don't see it yet..
i have a recipe that downloads and unpacks a tarball. my intention for
this is to have it download only if the target directory does not
exist on the node. but what's happening is, the tarball gets downloaded
on each run.
am i using "not_if" correctly below? any suggestions?
thanks!
kallen
if File.directory?("/usr/java/jdk#{java_version}.hoight.#{m_arch}")
after the first run, the above line is true
Chef::Log.debug("HIGGS-BOSON: dir exists: /usr/java/jdk#{java_version}.hoight.#{m_arch}")
end
execute "install_jdk_tarball" do
user "root"
cwd "/usr/java"
command "curl -s http://#{depot}/depot/jdk#{java_version}.hoight.#{m_arch}.tgz | tar zxf -"
not_if {File.directory?("#{java_home}/jdk#{java_version}.hoight.#{m_arch}")}
end
--
Opscode, Inc.
Adam Jacob, Chief Customer Officer
T: (206) 619-7151 E: adam@opscode.com
--
Opscode, Inc.
Adam Jacob, Chief Customer Officer
T: (206) 619-7151 E: adam@opscode.com