Sha256: 0c4f6dffdd51dcbc7295877203f44216a5af454f5b9d0ca2db13985244b9522d

Contents?: true

Size: 1002 Bytes

Versions: 14

Compression:

Stored size: 1002 Bytes

Contents

class SSHExecutionProvider < RemoteExecutionProvider
  class << self
    def proxy_command_options(template_invocation, host)
      super.merge(:ssh_user => ssh_user(host),
                  :effective_user => effective_user(template_invocation),
                  :effective_user_method => effective_user_method(host),
                  :cleanup_working_dirs => cleanup_working_dirs?(host),
                  :sudo_password => sudo_password(host),
                  :ssh_port => ssh_port(host))
    end

    def humanized_name
      _('SSH')
    end

    def supports_effective_user?
      true
    end

    def ssh_password(host)
      host_setting(host, :remote_execution_ssh_password)
    end

    def ssh_key_passphrase(host)
      host_setting(host, :remote_execution_ssh_key_passphrase)
    end

    private

    def ssh_user(host)
      host.host_param('remote_execution_ssh_user')
    end

    def ssh_port(host)
      Integer(host_setting(host, :remote_execution_ssh_port))
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
foreman_remote_execution-1.7.0 app/models/ssh_execution_provider.rb
foreman_remote_execution-1.6.7 app/models/ssh_execution_provider.rb
foreman_remote_execution-1.6.6 app/models/ssh_execution_provider.rb
foreman_remote_execution-1.6.5 app/models/ssh_execution_provider.rb
foreman_remote_execution-1.6.4 app/models/ssh_execution_provider.rb
foreman_remote_execution-1.5.6 app/models/ssh_execution_provider.rb
foreman_remote_execution-1.6.3 app/models/ssh_execution_provider.rb
foreman_remote_execution-1.6.2 app/models/ssh_execution_provider.rb
foreman_remote_execution-1.5.5 app/models/ssh_execution_provider.rb
foreman_remote_execution-1.6.1 app/models/ssh_execution_provider.rb
foreman_remote_execution-1.6.0 app/models/ssh_execution_provider.rb
foreman_remote_execution-1.5.4 app/models/ssh_execution_provider.rb
foreman_remote_execution-1.5.3 app/models/ssh_execution_provider.rb
foreman_remote_execution-1.5.2 app/models/ssh_execution_provider.rb