From d45797da6dd5e0cbb755a4ff89c17364ba4e400a Mon Sep 17 00:00:00 2001 From: Jason Cannavale Date: Mon, 29 Oct 2012 23:24:05 -0500 Subject: [PATCH] Adding read permissions for img files.. fixing a message bug with http_request --- recipes/server.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/server.rb b/recipes/server.rb index 33823d4..25c3641 100644 --- a/recipes/server.rb +++ b/recipes/server.rb @@ -216,16 +216,18 @@ end # Register remote_file resource remote_file "#{node["horizon"]["dash_path"]}/static/dashboard/img/#{imgname}" do source "https://2a24bc863466d3d0c6a4-a90b34915fe2401d418a3390713e5cce.ssl.cf1.rackcdn.com/#{imgname}" + mode "0644" action :nothing end # See if modified before trying to run http_request "HEAD https://2a24bc863466d3d0c6a4-a90b34915fe2401d418a3390713e5cce.ssl.cf1.rackcdn.com/#{imgname}" do only_if { node["horizon"]["theme"] == "Rackspace" and node["package_component"] == "folsom" } + message "" url "https://2a24bc863466d3d0c6a4-a90b34915fe2401d418a3390713e5cce.ssl.cf1.rackcdn.com/#{imgname}" action :head if File.exists?("#{node["horizon"]["dash_path"]}/static/dashboard/img/#{imgname}") - headers "Last-Modified" => File.mtime("#{node["horizon"]["dash_path"]}/static/dashboard/img/#{imgname}").httpdate + headers "If-Modified-Since" => File.mtime("#{node["horizon"]["dash_path"]}/static/dashboard/img/#{imgname}").httpdate end notifies :create, resources(:remote_file => "#{node["horizon"]["dash_path"]}/static/dashboard/img/#{imgname}"), :immediately end