Module: Hocho::InventoryProviders::Ec2::TemplateHelper

Included in:
HostnameTemplate, RunlistTemplate
Defined in:
lib/hocho/inventory_providers/ec2.rb

Instance Method Summary collapse

Instance Method Details

#tag(source, name, default = nil) ⇒ Object



12
13
14
15
# File 'lib/hocho/inventory_providers/ec2.rb', line 12

def tag(source, name, default = nil)
  t = source.tags.find{ |_| _.key == name }
  t ? t.value : default
end