Chapter 09/circuit-oneops-1-master/components/cookbooks/artifact/providers/deploy.rb
# Creates directories and symlinks as defined by the symlinks
# attribute of the resource.
#
# @return [void]
Creates directories and symlinks as defined by the symlinks
attribute of the resource.
Creates directories and symlinks as defined by the symlinks attribute of the resource .
def symlink_it_up!
    recipe_eval do
      new_resource.symlinks.each do |key, value|
        Chef::Log.info "artifact_deploy[symlink_it_up!] Creating and linking #{new_resource.shared_path}/#{key} to #{release_path}/#{value}"
        directory "#{new_resource.shared_path}/#{key}" do
          owner new_resource.owner
          group new_resource.group
          mode '0755'
          recursive true
        end
        link "#{release_path}/#{value}" do
          to "#{new_resource.shared_path}/#{key}"
          owner new_resource.owner
          group new_resource.group
        end
      end
    end
  end
def symlink_it_up! recipe_eval do new_resource . symlinks . each do | key , value | Chef :: Log . info "artifact_deploy[symlink_it_up!] Creating and linking #{new_resource.shared_path}/#{key} to #{release_path}/#{value}" directory "#{new_resource.shared_path}/#{key}" do owner new_resource . owner group new_resource . group mode '0755' recursive true end link "#{release_path}/#{value}" do to "#{new_resource.shared_path}/#{key}" owner new_resource . owner group new_resource . group end end end end
Creates directories and symlinks as defined by the symlinks
attribute of the resource.
Creates directories and symlinks as defined by the symlinks attribute of the resource .
None
void