Class: Serverspec::Backend::Ssh
- Defined in:
- lib/serverspec/backend/ssh.rb
Instance Method Summary collapse
Methods inherited from Exec
#check_belonging_group, #check_cron_entry, #check_directory, #check_enabled, #check_file, #check_group, #check_grouped, #check_installed, #check_installed_by_gem, #check_iptables_rule, #check_link, #check_listening, #check_mode, #check_owner, #check_running, #check_user, #check_zero, #commands, #initialize
Constructor Details
This class inherits a constructor from Serverspec::Backend::Exec
Instance Method Details
#do_check(cmd, opt = {}) ⇒ Object
6 7 8 9 |
# File 'lib/serverspec/backend/ssh.rb', line 6 def do_check(cmd, opt={}) cmd = "sudo #{cmd}" if not RSpec.configuration.ssh.[:user] == 'root' ssh_exec!(cmd) end |