Add option to see combined config
Easier to realize how merged configs appear
This commit is contained in:
@@ -44,6 +44,13 @@ class Mrsk::Cli::Main < Mrsk::Cli::Base
|
|||||||
invoke "mrsk:cli:app:details"
|
invoke "mrsk:cli:app:details"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc "config", "Show combined config"
|
||||||
|
def config
|
||||||
|
run_locally do
|
||||||
|
pp MRSK.config.to_h
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
desc "install", "Create config stub in config/deploy.yml and binstub in bin/mrsk"
|
desc "install", "Create config stub in config/deploy.yml and binstub in bin/mrsk"
|
||||||
option :skip_binstub, type: :boolean, default: false, desc: "Skip adding MRSK to the Gemfile and creating bin/mrsk binstub"
|
option :skip_binstub, type: :boolean, default: false, desc: "Skip adding MRSK to the Gemfile and creating bin/mrsk binstub"
|
||||||
def install
|
def install
|
||||||
|
|||||||
@@ -112,6 +112,20 @@ class Mrsk::Configuration
|
|||||||
ENV["RAILS_MASTER_KEY"] || File.read(Pathname.new(File.expand_path("config/master.key")))
|
ENV["RAILS_MASTER_KEY"] || File.read(Pathname.new(File.expand_path("config/master.key")))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def to_h
|
||||||
|
{
|
||||||
|
roles: role_names,
|
||||||
|
hosts: hosts,
|
||||||
|
primary_host: primary_host,
|
||||||
|
version: version,
|
||||||
|
repository: repository,
|
||||||
|
absolute_image: absolute_image,
|
||||||
|
service_with_version: service_with_version,
|
||||||
|
env_args: env_args,
|
||||||
|
ssh_options: ssh_options
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
attr_accessor :config
|
attr_accessor :config
|
||||||
|
|||||||
Reference in New Issue
Block a user