search for: am_running_oss

Displaying 2 results from an estimated 2 matches for "am_running_oss".

2013 Oct 13
24
exporting custom facts to puppet agents
...ts[1] > when /^Mac/ > (g_C[:mac] ||= []) << parts[0] > when /_Win$/ > (g_C[:win] ||= []) << parts[0] > else > (g_C[:linux] ||= []) << parts[0] > end > end > end > > Facter.add(:am_running_oss) do > has_weight 100 > if gos.count >= 1 > setcode { gos.keys.join('','') } > else > setcode { ''undefined'' } > end > end > The file is on the PuppetMaster. Hence the custom fact ''am_running_oss...
2013 Oct 21
3
how to pass the value to custom function?
...ll, I''m trying this thing for a while but can''t figure out what am I doing wrong. Here is my sample function (which is similar to the original one, except for the hash, which is generated dynamically in the original one): module Puppet::Parser::Functions > newfunction(:am_running_oss, :type => :rvalue ) do |args| > > oss = {:linux=>["Slackware", "RedHat", "Caldera"], > :mac=>["Jaguar", "Lion", "Tiger", "Kodiak"], > :win=>["Chicago", &quot...