Class: Shelter::CLI::Command::Vault
- Inherits:
-
Thor
- Object
- Thor
- Shelter::CLI::Command::Vault
- Defined in:
- lib/cli/command/vault.rb
Overview
Ansible vault subcommand for Shelter
Instance Method Summary collapse
Instance Method Details
#create(file) ⇒ Object
11 12 13 |
# File 'lib/cli/command/vault.rb', line 11 def create(file) vault_execute('create', file) end |
#list ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/cli/command/vault.rb', line 26 def list file_list = Dir["#{App.config.secure_root}/**/*_secret.yaml"].to_a formatted = file_list.map do |f| " #{f.sub(App.config.secure_root, '').sub('_secret.yaml', '')}" end puts formatted.join("\n") end |
#update(file) ⇒ Object
16 17 18 |
# File 'lib/cli/command/vault.rb', line 16 def update(file) vault_execute('edit', file) end |
#view(file) ⇒ Object
21 22 23 |
# File 'lib/cli/command/vault.rb', line 21 def view(file) vault_execute('view', file) end |