On Wed, Sep 21, 2011 at 9:45 AM, Glenn Bailey
<[email protected]> wrote:
> Howdy,
>
> Before I go about writing one myself, anyone out there written a
> software inventory module/fact for gathering a list of all installed
> rpms/debs on a system? Got a few ideas floating around in my head, but
> wanted to see if/what other folks have done ..

We've written some custom facts that return a JSON string and then we
wrote a custom function that uses PSON.parse() to process and return
the native data.  Since puppet supports arrays and dictionaries, this
works well.

One problem is if you have any Nones/Nulls in your JSON, PSON.parse()
doesn't handle them right.  Once bubbled up to puppet, they don't come
out as undef.. they come out as some strange type that puppet doesn't
recognize as false yet has no value.   So we post process the
PSON.parse() and clean out the Ruby nil's and just make them "".

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to