oneops-admin/lib/shared/cookbooks/artifact/providers/file.rb
def remote_file_resource
  Chef::Log.info "Remote file: #{file_location}"
  Chef::Log.info "Local file: #{new_resource.name}"
  @remote_file_resource ||= remote_file new_resource.name do
    source file_location
    checksum new_resource.checksum if !new_resource.checksum.nil?
    owner new_resource.owner
    group new_resource.group
    backup false
    action :nothing
  end
end
# Creates a remote_file resource that will download the artifact
# and has default idempotency. The action is set to nothing so that
# it can be called later.
#
# @return [Chef::Resource::RemoteFile]
Creates a remote_file resource that will download the artifact
and has default idempotency. The action is set to nothing so that
it can be called later.
Creates a remote_file resource that will download the artifact and has default idempotency . The action is set to nothing so that it can be called later .
def remote_file_resource
  Chef::Log.info "Remote file: #{file_location}"
  Chef::Log.info "Local file: #{new_resource.name}"
  @remote_file_resource ||= remote_file new_resource.name do
    source file_location
    checksum new_resource.checksum if !new_resource.checksum.nil?
    owner new_resource.owner
    group new_resource.group
    backup false
    action :nothing
  end
end
def remote_file_resource Chef :: Log . info "Remote file: #{file_location}" Chef :: Log . info "Local file: #{new_resource.name}" @remote_file_resource ||= remote_file new_resource . name do source file_location checksum new_resource . checksum if ! new_resource . checksum . nil? owner new_resource . owner group new_resource . group backup false action :nothing end end
Creates a remote_file resource that will download the artifact
and has default idempotency.
Creates a remote_file resource that will download the artifact and has default idempotency .
None
Chef::Resource::RemoteFile