class Object

Public Instance Methods

horn() click to toggle source
# File lib/foghorn/recipes.rb, line 19
def horn
  @foghorn ||= Foghorn::Horn.new(self)
end
role_by_tag(r, *tags) click to toggle source
# File lib/foghorn/recipes.rb, line 6
def role_by_tag(r, *tags)
  servers = foghorn.horn.servers(tags)
    .select { |server| server.dns_name }
  fail "Couldn't find any servers tagged with #{tags}" if servers.empty?
  puts r
  servers.each do |server|
    puts "        #{server.tags['Name']}"
    foghorn.horn.active_servers << server
    role r, server.dns_name
  end
end