Class: GDK::Command::Bao

Inherits:
BaseCommand show all
Defined in:
lib/gdk/command/bao.rb

Overview

Configures openbao client

Instance Attribute Summary

Attributes inherited from BaseCommand

#stderr, #stdout

Instance Method Summary collapse

Methods inherited from BaseCommand

#config, #display_help_message, #help, #initialize, #print_help, #print_ready_message, #ready_messages, validate_config?

Constructor Details

This class inherits a constructor from GDK::Command::BaseCommand

Instance Method Details

#run(args = []) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/gdk/command/bao.rb', line 7

def run(args = [])
  unless GDK.config.openbao.enabled?
    GDK::Output.warn('OpenBao is not enabled. See doc/howto/openbao.md for getting started with OpenBao.')
    return false
  end

  case args.pop
  when 'configure'
    GDK::OpenBao.new.configure
  else
    GDK::Output.warn('Usage: gdk bao configure')
    false
  end
end