Exception: Machinery::Errors::SudoPasswordRequired
- Inherits:
-
MachineryError
- Object
- StandardError
- MachineryError
- Machinery::Errors::SudoPasswordRequired
- Defined in:
- lib/exceptions.rb
Overview
An error for inspecting a remote system as a non-root user
Instance Method Summary collapse
-
#initialize(host) ⇒ SudoPasswordRequired
constructor
A new instance of SudoPasswordRequired.
- #to_s ⇒ Object
Constructor Details
#initialize(host) ⇒ SudoPasswordRequired
Returns a new instance of SudoPasswordRequired.
158 159 160 |
# File 'lib/exceptions.rb', line 158 def initialize(host) @host = host end |
Instance Method Details
#to_s ⇒ Object
162 163 164 165 166 |
# File 'lib/exceptions.rb', line 162 def to_s "`sudo` can be used only on #{@host}, when no password is required." \ " Make sure that you have the following line in `etc/sudoers` on the remote host:\n" \ " machinery ALL=(ALL) NOPASSWD: ALL" end |