Skip to content

Instantly share code, notes, and snippets.

View ohadlevy's full-sized avatar

Ohad Levy ohadlevy

  • Red Hat
  • Israel
View GitHub Profile
#! /usr/bin/ruby
# Query Foreman
# example usage:
#
# query for hosts
# ~~~~~~~~~~~~~~~
# $myhosts = foreman("hosts","facts.domain ~ lab")
# returns all hosts which have lab as part of their domain.
#