Sha256: da805fe28d28b85e0eb1a18180158444c8afcedaf72e58e150b83e15e160aa83
Contents?: true
Size: 718 Bytes
Versions: 107
Compression:
Stored size: 718 Bytes
Contents
module Kontena::Cli::Vault class ReadCommand < Kontena::Command include Kontena::Cli::Common include Kontena::Cli::GridOptions parameter "NAME", "Secret name" option '--value', :flag, 'Just output the value' option '--return', :flag, 'Return the value', hidden: true def execute require_api_url require_current_grid token = require_token result = client(token).get("secrets/#{current_grid}/#{name}") return result['value'] if self.return? if self.value? puts result['value'] else puts "#{result['name']}:" puts " created_at: #{result['created_at']}" puts " value: #{result['value']}" end end end end
Version data entries
107 entries across 107 versions & 2 rubygems