fixup-PR#506 Speed improvements in facter resolution

This is to improve speed on Facter resolution of service_provider fact
that was just introduced in PR# 506.  The improvements go from 280ms
resolution time approx. down to 2ms resolution time approx. by adding
requires statements.
This commit is contained in:
Adam S 2015-09-25 17:58:05 -07:00
parent 4d1bca3359
commit 440245d40d

View file

@ -7,6 +7,9 @@
#
# Caveats:
#
require 'puppet/type'
require 'puppet/type/service'
Facter.add(:service_provider) do
setcode do
Puppet::Type.type(:service).newservice(:name => 'dummy')[:provider].to_s