Exception: DreamOps::RoleNotFoundError

Inherits:
DreamOpsError show all
Defined in:
lib/dream-ops/errors.rb

Instance Method Summary collapse

Methods inherited from DreamOpsError

set_status_code

Constructor Details

#initialize(target, role) ⇒ RoleNotFoundError

Returns a new instance of RoleNotFoundError.



138
139
140
141
# File 'lib/dream-ops/errors.rb', line 138

def initialize(target, role)
  @target = target
  @role   = role
end

Instance Method Details

#to_sObject



143
144
145
146
147
148
149
# File 'lib/dream-ops/errors.rb', line 143

def to_s
  [
    "Could not find /var/chef/roles/#{@role}.json \"#{@target}\". To initialize with an empty runlist, run:",
    "",
    "dream init solo -t #{@target} -i #{DreamOps.ssh_key}",
  ].join("\n")
end