Sha256: a0e7b4f4f44b64005d8bbfba9cebe7fa3b7ecc5cbb4d67f9103aefad7bac1685
Contents?: true
Size: 839 Bytes
Versions: 9
Compression:
Stored size: 839 Bytes
Contents
include Specinfra::Helper::Set class Koma::Backend::Base attr_reader :host, :options, :inventory_keys def initialize(host, options) @host = host @options = options @inventory_keys = Koma::HostInventory.inventory_keys end def out(key = nil) out = {} keys = if key.nil? inventory_keys else key.split(',') end Koma::HostInventory.disabled_keys.each do |k| keys.push(k) if @options["with-#{k}"] end keys.each do |k| raise Koma::NotImplementedKeyError unless Koma::HostInventory.all_inventory_keys.include?(k) begin out[k] = Specinfra.backend.host_inventory[k] out[k] = Specinfra.backend.host_inventory[k].inspect if k == 'ec2' rescue NotImplementedError out[k] = nil end end out end end
Version data entries
9 entries across 9 versions & 1 rubygems