Skip to content

Instantly share code, notes, and snippets.

@ohadlevy
Created March 3, 2010 14:07
Show Gist options
  • Save ohadlevy/320623 to your computer and use it in GitHub Desktop.
Save ohadlevy/320623 to your computer and use it in GitHub Desktop.
require 'foreman'
hosts = gethosts({"fact"=>{"domain"=>"lan", "puppetversion"=>"0.25.4"}})
if hosts.nil?
puts "no hosts found"
else
puts hosts.join(" ")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment