Class: Promote::PasswordVault

Inherits:
Object
  • Object
show all
Includes:
ChefServer
Defined in:
lib/promote/password_vault.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ChefServer

#with_chef_server

Constructor Details

#initialize(node, config) ⇒ PasswordVault

Returns a new instance of PasswordVault.



8
9
10
11
# File 'lib/promote/password_vault.rb', line 8

def initialize(node, config)
  @node = node
  @config = config
end

Instance Attribute Details

#configObject

Returns the value of attribute config.



13
14
15
# File 'lib/promote/password_vault.rb', line 13

def config
  @config
end

#nodeObject

Returns the value of attribute node.



14
15
16
# File 'lib/promote/password_vault.rb', line 14

def node
  @node
end

Instance Method Details

#admin_passwordObject



20
21
22
# File 'lib/promote/password_vault.rb', line 20

def admin_password
  raw['local_admin_password']
end

#rawObject



24
25
26
# File 'lib/promote/password_vault.rb', line 24

def raw
  @raw ||= load_secrets
end

#root_passwordObject



16
17
18
# File 'lib/promote/password_vault.rb', line 16

def root_password
  raw['local_root_password']
end