lib/mascherano/tasks/auth_basic.cap in mascherano-1.1.0 vs lib/mascherano/tasks/auth_basic.cap in mascherano-1.2.0
- old
+ new
@@ -8,19 +8,20 @@
run_locally do
htpasswd = capture(:htpasswd, '-nb', fetch(:auth_basic_user), passwd)
htpasswd.chomp!
end
- on roles(fetch(:auth_basic_roles)) do
+ on fetch(:auth_basic_servers) do
upload! StringIO.new(htpasswd), fetch(:auth_basic_target)
execute :chmod, 'o+r', fetch(:auth_basic_target)
end
end
end
namespace :load do
task :defaults do
- set :auth_basic_user, 'root'
- set :auth_basic_roles, :all
- set :auth_basic_target, -> { shared_path.join('.htpasswd') }
+ set :auth_basic_user, 'root'
+ set :auth_basic_roles, :all
+ set :auth_basic_servers, -> { release_roles(fetch(:auth_basic_roles)) }
+ set :auth_basic_target, -> { shared_path.join('.htpasswd') }
end
end