Sha256: 534a9da4f40adc7e651c26b0a7005d24561c0406b9e4c4c14e24c092f37f3309
Contents?: true
Size: 496 Bytes
Versions: 1
Compression:
Stored size: 496 Bytes
Contents
require 'tagenv/version' require 'tagenv/constants' require 'tagenv/ec2/metadata' require 'tagenv/ec2/tag' require 'tagenv/cli' module Tagenv def self.load(prefix: '', instance_id: nil, provider: 'ec2') tag_hash = {} if provider == 'ec2' @ec2_tag = Ec2::Tag.new(prefix: prefix, instance_id: instance_id) tag_hash = @ec2_tag.get_tag_hash else raise "Unsupport provider [#{provider}]" end tag_hash.each do |k, v| ENV[prefix + k] = v end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tagenv-0.1.6 | lib/tagenv.rb |