Skip to content

Instantly share code, notes, and snippets.

@pnasrat
Created November 25, 2010 06:15
Show Gist options
  • Select an option

  • Save pnasrat/714987 to your computer and use it in GitHub Desktop.

Select an option

Save pnasrat/714987 to your computer and use it in GitHub Desktop.
# bar.rb
Facter.add("bar") do
setcode do
if (Facter.value("foo_1") == "option1") then
"cond1"
else
"default"
end
end
end
# foo.rb
Facter.add("foo_1") do
setcode do
"option1"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment