Class: Kontena::Cli::Stacks::YAML::Opto::Setters::Vault

Inherits:
Opto::Setter
  • Object
show all
Includes:
Common
Defined in:
lib/kontena/cli/stacks/yaml/opto/vault_setter.rb

Instance Method Summary collapse

Methods included from Common

#access_token=, #add_master, #any_key_to_continue, #any_key_to_continue_with_timeout, #api_url, #api_url=, #caret, #clear_current_grid, #client, #cloud_auth?, #cloud_client, #config, #confirm, #confirm_command, #current_grid, #current_master_index, #debug?, #display_account_login_info, #display_login_info, display_logo, #display_master_login_info, #error, exit_with_error, #kontena_account, #logger, #pastel, #print, #prompt, #puts, #require_api_url, #require_token, #reset_client, #reset_cloud_client, #running_quiet?, #running_silent?, #running_verbose?, #spin_if, #spinner, #sprint, #sputs, #stdin_input, #use_refresh_token, #vfakespinner, #vputs, #vspinner, #warning

Instance Method Details

#set(value) ⇒ Object



5
6
7
8
9
# File 'lib/kontena/cli/stacks/yaml/opto/vault_setter.rb', line 5

def set(value)
  if current_master && current_grid
    client.put("secrets/#{current_grid}/#{hint}", {name: hint, value: value, upsert: true})
  end
end