Follow web role logs when no roles are specified

This commit is contained in:
milk1000cc
2023-03-28 09:02:42 +09:00
parent 03614bfb79
commit 15a41d3fd8

View File

@@ -143,12 +143,11 @@ class Mrsk::Cli::App < Mrsk::Cli::Base
run_locally do run_locally do
info "Following logs on #{MRSK.primary_host}..." info "Following logs on #{MRSK.primary_host}..."
roles = MRSK.roles_on(MRSK.primary_host) MRSK.specific_roles ||= ["web"]
role = MRSK.roles_on(MRSK.primary_host).first
roles.each do |role| info MRSK.app(role: role).follow_logs(host: MRSK.primary_host, grep: grep)
info MRSK.app(role: role).follow_logs(host: MRSK.primary_host, grep: grep) exec MRSK.app(role: role).follow_logs(host: MRSK.primary_host, grep: grep)
exec MRSK.app(role: role).follow_logs(host: MRSK.primary_host, grep: grep)
end
end end
else else
since = options[:since] since = options[:since]