Sha256: c8aed37d95185de6e94a1b5ab163b51ca2678ce61572b64e005e22a8e732de70
Contents?: true
Size: 714 Bytes
Versions: 30
Compression:
Stored size: 714 Bytes
Contents
module Kontena::Cli::Master::Config class GetCommand < Kontena::Command include Kontena::Cli::Common requires_current_master requires_current_master_token banner "Reads a configuration value from master" parameter "KEY", "Configuration key to read from master", required: true option ['-p', '--pair'], :flag, "Print key=value instead of only value" option '--return', :flag, "Return the value", hidden: true def execute if self.pair? puts client.get("config/#{self.key}").inspect elsif self.return? return client.get("config/#{self.key}")[self.key] else puts client.get("config/#{self.key}")[self.key] end end end end
Version data entries
30 entries across 30 versions & 1 rubygems