Class: Dependencies::Sshkey
Constant Summary
collapse
- DEFAULT_KEY_SIZE =
4096
- DEFAULT_KEY_ALGO =
"rsa"
- DEFAULT_KEY_LIFETIME_S =
3600
- DEFAULT_KEY_FILE_COMMENT_COMMAND =
"$USER@`hostname -s`"
Constants inherited
from Dependency
Dependency::DESCRIPTION_TYPE_WIDTH
Instance Attribute Summary
Attributes inherited from Dependency
#name
Instance Method Summary
collapse
Methods inherited from Dependency
#always_act?, #exit_code, #failure?, #initialize, #output, #success?, #type
Constructor Details
This class inherits a constructor from Dependency
Instance Method Details
#meet ⇒ Object
18
19
20
21
22
23
24
25
26
|
# File 'lib/dependencies/sshkey.rb', line 18
def meet
Secrets.load
Output.warn("\nNo passphrase set for SSH key '#{priv_key_name}'") if passphrase.nil? || passphrase.empty?
FileUtils.mkdir_p(dir_name) unless File.directory?(dir_name)
generate_key unless File.exist?(priv_key_name) && File.exist?(pub_key_name)
add_key if success? && should_add_key?
end
|
#met? ⇒ Boolean
13
14
15
16
|
# File 'lib/dependencies/sshkey.rb', line 13
def met?
false
end
|
#should_meet? ⇒ Boolean
32
33
34
|
# File 'lib/dependencies/sshkey.rb', line 32
def should_meet?
true
end
|
#unmeet ⇒ Object
28
29
30
|
# File 'lib/dependencies/sshkey.rb', line 28
def unmeet
true
end
|