Sha256: 63839665fc03238a215da4724de78c4a2003a9bd430c778f1476829010e178fb
Contents?: true
Size: 462 Bytes
Versions: 1
Compression:
Stored size: 462 Bytes
Contents
#!/usr/bin/env ruby require 'uri' require 'net/http' # this is used for external node lookup in celestial puppet std provider node = ARGV[0] if(File.exists?("#{node}.yml")) host = node.split('.').first File.open("#{node}.yml").lines.each {|l| puts l} else ip = ENV['SSH_CONNECTION'].split(' ').first httpcall = Net::HTTP.new(ip, 8082) resp, data = httpcall.get2("/registry/host/type/#{node}", 'Accept' => 'application/x-yaml') puts resp.body end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
opskeleton-0.1.8 | templates/scripts/lookup.rb |