Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.76 KB | None | 0 0
  1.  
  2. ## Error
  3. [Tue, 26 Jul 2011 12:55:43 +1200] FATAL: Chef::Exceptions::ResourceNotFound: Resource template[/etc/default/xendomains] is configured to notify resource resource[grub] with action update, but resource[grub] cannot be found in the resource collection. template[/etc/default/xendomains] is defined in /var/chef/cookbooks/xen/recipes/xen4.rb:10:in `from_file'
  4.  
  5. ## test/recipes/default.rb
  6.  
  7. %w{xendomains grub}.each do |cfg|
  8.  template "/etc/default/#{cfg}" do
  9.    source "#{cfg}.erb"
  10.    owner "root"
  11.    group "root"
  12.    mode "0744"
  13.    notifies :update, "resource[grub]"
  14.  end
  15. end
  16.  
  17. ## grub/provider/default.rb
  18.  
  19. action :update do
  20.  execute "update grub" do
  21.    command "/usr/sbin/update-grub"
  22.  end
  23. end
  24.  
  25. ## grub/resource/default.rb
  26.  
  27. actions :update
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement