Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hq_repo = db["tools"]["repo"]
- hq_srcfile = "royrusso-elasticsearch-HQ-603ae9e.zip"
- hq_filepath = "#{Chef::Config['file_cache_path']}/#{hq_srcfile}"
- remote_file "#{hq_filepath}" do
- source "#{hq_repo}#{hq_srcfile}"
- owner 'elasticsearch'
- group 'elasticsearch'
- mode 00644
- not_if { ::File.exists?(hq_filepath) }
- end
- #######################3
- * remote_file[/var/chef/cache/royrusso-elasticsearch-HQ-603ae9e.zip] action create
- ================================================================================
- Error executing action `create` on resource 'remote_file[/var/chef/cache/royrusso-elasticsearch-HQ-603ae9e.zip]'
- ================================================================================
- NoMethodError
- -------------
- undefined method `host' for "":String
- Resource Declaration:
- ---------------------
- # In /var/chef/cache/cookbooks/neteng/recipes/elasticsearch.rb
- 122: remote_file "#{hq_filepath}" do
- 123: source "#{hq_repo}#{hq_srcfile}"
- 124: owner 'elasticsearch'
- 125: group 'elasticsearch'
- 126: mode 00644
- 127: not_if { ::File.exists?(hq_filepath) }
- 128: end
- 129:
- Compiled Resource:
- ------------------
- # Declared in /var/chef/cache/cookbooks/neteng/recipes/elasticsearch.rb:122:in `from_file'
- remote_file("/var/chef/cache/royrusso-elasticsearch-HQ-603ae9e.zip") do
- provider Chef::Provider::RemoteFile
- action [:create]
- retries 0
- retry_delay 2
- default_guard_interpreter :default
- path "/var/chef/cache/royrusso-elasticsearch-HQ-603ae9e.zip"
- backup 5
- atomic_update true
- source ["http://10.1.24.15/chef/royrusso-elasticsearch-HQ-603ae9e.zip"]
- use_etag true
- use_last_modified true
- declared_type :remote_file
- cookbook_name "neteng"
- recipe_name "elasticsearch"
- owner "elasticsearch"
- group "elasticsearch"
- mode 420
- not_if { #code block }
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement