Simplify domain language to just "boot" and unscoped config keys
This commit is contained in:
@@ -13,7 +13,7 @@ class Mrsk::Cli::App < Mrsk::Cli::Base
|
||||
execute *MRSK.app.tag_current_as_latest
|
||||
end
|
||||
|
||||
on(MRSK.hosts, **MRSK.group_strategy) do |host|
|
||||
on(MRSK.hosts, **MRSK.boot_strategy) do |host|
|
||||
roles = MRSK.roles_on(host)
|
||||
|
||||
roles.each do |role|
|
||||
|
||||
@@ -51,9 +51,9 @@ class Mrsk::Commander
|
||||
end
|
||||
end
|
||||
|
||||
def group_strategy
|
||||
if config.boot.group_limit.present?
|
||||
{ in: :groups, limit: config.boot.group_limit, wait: config.boot.group_wait }
|
||||
def boot_strategy
|
||||
if config.boot.limit.present?
|
||||
{ in: :groups, limit: config.boot.limit, wait: config.boot.wait }
|
||||
else
|
||||
{}
|
||||
end
|
||||
|
||||
@@ -4,8 +4,9 @@ class Mrsk::Configuration::Boot
|
||||
@host_count = config.all_hosts.count
|
||||
end
|
||||
|
||||
def group_limit
|
||||
limit = @options["group_limit"]
|
||||
def limit
|
||||
limit = @options["limit"]
|
||||
|
||||
if limit.to_s.end_with?("%")
|
||||
@host_count * limit.to_i / 100
|
||||
else
|
||||
@@ -13,7 +14,7 @@ class Mrsk::Configuration::Boot
|
||||
end
|
||||
end
|
||||
|
||||
def group_wait
|
||||
@options["group_wait"]
|
||||
def wait
|
||||
@options["wait"]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user