purpleidea/puppet-ipa — pull request #1 by rfugina (2014-09-15 15:26:32+00:00)
Title: Prevent warning "undefined method `strip' for nil:NilClass"

After adding this module to our Puppet server, we started getting the following warning on our non-RH/CentOS/Fedora boxes:

Could not retrieve fact='ipa_version', resolution='': undefined method `strip' for nil:NilClass

I've rearranged the offending code such that it won't even try to set up a new ipa_version fact if the exec of yum outputs nothing.

Existing comments suggest only acting on RH/CentOS/Fedora, but I suspect the warning would still appear if IPA weren't installed on a particular system. This will keep it quiet in that case as well.