Chef infra 停止chef创建递归符号链接

Chef infra 停止chef创建递归符号链接,chef-infra,chef-recipe,Chef Infra,Chef Recipe,我在迁移之前({'folder'=>'folder'})使用deploy资源和symlink\u,它将current/folder正确链接到shared/folder但也创建链接到shared/folder ls -alh /proj_dir/current/folder/ drwxrwxr-x 2 ubuntu ubuntu 4.0K May 9 07:39 . drwxrwxr-x 9 ubuntu ubuntu 4.0K May 9 07:39 .. -rw-rw---- 1 ubun

我在迁移之前({'folder'=>'folder'})使用
deploy
资源和
symlink\u
,它将
current/folder
正确链接到
shared/folder
但也创建链接到
shared/folder

ls -alh /proj_dir/current/folder/
drwxrwxr-x 2 ubuntu ubuntu 4.0K May  9 07:39 .
drwxrwxr-x 9 ubuntu ubuntu 4.0K May  9 07:39 ..
-rw-rw---- 1 ubuntu ubuntu 1.2K May  9 07:39 file1
-rw-rw---- 1 ubuntu ubuntu 1.3K May  9 07:39 file2
lrwxrwxrwx 1 ubuntu ubuntu   41 May  9 07:39 folder -> /proj_dir/shared/folder
如何阻止Chef创建递归符号链接

----编辑-----


请发布您正在使用的部署资源。我添加了资源。
 deploy "#{project_dir}" do
    repo "git@github.com:company/project.git"
    branch environment == "production" ? "master" : "staging"
    action :deploy
    user "ubuntu"
    group "ubuntu"
    environment({ "RAILS_ENV" => environment })

    symlink_before_migrate.clear
    symlink_before_migrate({"config/aws.yml" => "config/aws.yml",
                             "config/database.yml" => "config/database.yml",
                             "config/integrations.yml" => "config/integrations.yml",
                             "public/assets" => "public/assets",
                             "public/robots.txt" => "public/robots.txt",
                             "public/blog" => "public/blog"})
    before_symlink do
      rvm_shell "run bundle install for #{node['rvm']['default_ruby']}" do
        user "ubuntu"
        ruby_string node['rvm']['default_ruby']
        code "bundle install --gemfile #{release_path}/Gemfile --path #{project_dir}/shared/bundle --deployment --quiet --without development test"
      end
      rvm_shell "rake db:migrate" do
        user "ubuntu"
        ruby_string node['rvm']['default_ruby']
    cwd "#{release_path}"
        code "cd #{release_path} && RAILS_ENV=#{environment} bundle exec rake db:migrate"
        only_if {node.role?("run_migrations")}
      end
    end
    before_restart do
      rvm_shell "run rake assets:precompile" do
        user "ubuntu"
        ruby_string node['rvm']['default_ruby']
    cwd "#{release_path}"
        code "RAILS_ENV=#{environment} bundle exec rake assets:precompile"
      end
    end