- From: Brian Akins <
>
- To: chef <
>
- Subject: [chef] http_request bug?
- Date: Mon, 24 Sep 2012 23:48:09 -0400
I have a simple LWRP based on the code from the wiki:
http://wiki.opscode.com/display/chef/Resources#Resources-HTTPRequest
for doing a head request with if-modified-since to conditionally
trigger a remote_file. This now triggers every time since upgrading
to 10.14. Is this a known issue?
Sample simplified LWRP provider code:
action :create do
remote_file new_resource.path do
owner new_resource.owner
group new_resource.group
mode new_resource.mode
source new_resource.source
action :nothing
end
http_request "HEAD #{new_resource.source}" do
message ""
url new_resource.source
action :head
if ::File.exists?(new_resource.path)
headers "If-Modified-Since" => ::File.mtime(new_resource.path).httpdate
end
notifies :create, resources(:remote_file => new_resource.path),
:immediately
end
end
- [chef] http_request bug?, Brian Akins, 09/24/2012
Archive powered by MHonArc 2.6.16.