Module: InfoStatusSSH
- Included in:
- Takelage::InfoStatus
- Defined in:
- lib/takelage/info/status/ssh.rb
Overview
takelage info status ssh
Instance Method Summary collapse
-
#info_status_ssh ⇒ Boolean
Backend method for info status ssh.
Instance Method Details
#info_status_ssh ⇒ Boolean
Backend method for info status ssh. rubocop:disable Metrics/MethodLength
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/takelage/info/status/ssh.rb', line 8 def info_status_ssh log.debug 'Check ssh status' ssh_auth_sock = ENV['SSH_AUTH_SOCK'] gpg_ssh_socket = _info_status_ssh_socket_path.chomp unless ssh_auth_sock == gpg_ssh_socket log.error 'ssh does not use gpg ssh socket' return false end unless _file_exists? gpg_ssh_socket log.error 'gpg ssh socket is not available' return false end unless _info_status_ssh_keys log.error 'ssh keys are not available' return false end log.debug 'ssh is available' true end |