engineyard / ey-cloud-recipes

A starter repo for custom chef recipes on EY's cloud platform. These are for reference, and do not indicate a supported status.
http://www.engineyard.com/products/cloud
Other
980 stars 291 forks source link

Chef run fails with "nginx.logrotate" is not a valid `source` parameter for remote_file. #317

Closed sankara closed 5 years ago

sankara commented 7 years ago
Digest::Digest is deprecated; use Digest
Digest::Digest is deprecated; use Digest

================================================================================
Recipe Compile Error in /etc/chef/recipes/cookbooks/ey-init/recipes/main.rb
================================================================================

Chef::Exceptions::InvalidRemoteFileURI
--------------------------------------
"nginx.logrotate" is not a valid `source` parameter for remote_file. `source` must be an absolute URI or an array of URIs.

Cookbook Trace:
---------------
  /etc/chef/recipes/cookbooks/logrotate/recipes/default.rb:7:in `block in from_file'
  /etc/chef/recipes/cookbooks/logrotate/recipes/default.rb:6:in `from_file'
  /etc/chef/recipes/cookbooks/ey-core/recipes/default.rb:16:in `from_file'
  /etc/chef/recipes/cookbooks/ey-init/recipes/main.rb:16:in `from_file'

Relevant File Content:
----------------------
/etc/chef/recipes/cookbooks/logrotate/recipes/default.rb:

  1:  #
  2:  # Cookbook Name:: logrotate
  3:  # Recipe:: default
  4:  #
  5:  
  6:  remote_file "/etc/logrotate.d/nginx" do
  7>>   source "nginx.logrotate"
  8:    owner "root"
  9:    group "root"
 10:    mode "0644"
 11:    backup 0
 12:  end
 13:  
 14:  cron "logrotate -f /etc/logrotate.d/nginx" do
 15:    minute  '0'
 16:    command "logrotate -f /etc/logrotate.d/nginx"

Platform:
---------
x86_64-linux
RajRoR commented 7 years ago

Did you find the fix?