我正在尝试从我的current_path
.
这是我的上限任务:
on roles(:app) do
execute :sudo, :ln, "-nfs", "#{fetch(:current_path)}/config/nginx_#{fetch(:stage)}.conf /etc/nginx/sites-enabled/#{fetch(:application)}"
end
在我的服务器中,sudoers
我有:
Cmnd_Alias LNFROMCURR = /bin/ln -nfs /home/deployer/app_name/current/* /etc/nginx/sites-enabled/*
deployer ALL=NOPASSWD: LNFROMCURR
然而在部署期间 capistrano 要求我输入 sudo 的密码。我什至尝试过使突然的规则更通用,但无济于事。