Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. hq_repo = db["tools"]["repo"]
  2. hq_srcfile = "royrusso-elasticsearch-HQ-603ae9e.zip"
  3. hq_filepath = "#{Chef::Config['file_cache_path']}/#{hq_srcfile}"
  4.  
  5. remote_file "#{hq_filepath}" do
  6. source "#{hq_repo}#{hq_srcfile}"
  7. owner 'elasticsearch'
  8. group 'elasticsearch'
  9. mode 00644
  10. not_if { ::File.exists?(hq_filepath) }
  11. end
  12.  
  13. #######################3
  14.  
  15. * remote_file[/var/chef/cache/royrusso-elasticsearch-HQ-603ae9e.zip] action create
  16.  
  17. ================================================================================
  18. Error executing action `create` on resource 'remote_file[/var/chef/cache/royrusso-elasticsearch-HQ-603ae9e.zip]'
  19. ================================================================================
  20.  
  21. NoMethodError
  22. -------------
  23. undefined method `host' for "":String
  24.  
  25. Resource Declaration:
  26. ---------------------
  27. # In /var/chef/cache/cookbooks/neteng/recipes/elasticsearch.rb
  28.  
  29. 122: remote_file "#{hq_filepath}" do
  30. 123: source "#{hq_repo}#{hq_srcfile}"
  31. 124: owner 'elasticsearch'
  32. 125: group 'elasticsearch'
  33. 126: mode 00644
  34. 127: not_if { ::File.exists?(hq_filepath) }
  35. 128: end
  36. 129:
  37.  
  38. Compiled Resource:
  39. ------------------
  40. # Declared in /var/chef/cache/cookbooks/neteng/recipes/elasticsearch.rb:122:in `from_file'
  41.  
  42. remote_file("/var/chef/cache/royrusso-elasticsearch-HQ-603ae9e.zip") do
  43. provider Chef::Provider::RemoteFile
  44. action [:create]
  45. retries 0
  46. retry_delay 2
  47. default_guard_interpreter :default
  48. path "/var/chef/cache/royrusso-elasticsearch-HQ-603ae9e.zip"
  49. backup 5
  50. atomic_update true
  51. source ["http://10.1.24.15/chef/royrusso-elasticsearch-HQ-603ae9e.zip"]
  52. use_etag true
  53. use_last_modified true
  54. declared_type :remote_file
  55. cookbook_name "neteng"
  56. recipe_name "elasticsearch"
  57. owner "elasticsearch"
  58. group "elasticsearch"
  59. mode 420
  60. not_if { #code block }
  61. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement