2015-08-19 17:31:36 +02:00
|
|
|
# Fact: service_provider
|
|
|
|
#
|
|
|
|
# Purpose: Returns the default provider Puppet will choose to manage services
|
|
|
|
# on this system
|
|
|
|
#
|
|
|
|
# Resolution: Instantiates a dummy service resource and return the provider
|
|
|
|
#
|
|
|
|
# Caveats:
|
|
|
|
#
|
2015-09-26 02:58:05 +02:00
|
|
|
require 'puppet/type'
|
|
|
|
require 'puppet/type/service'
|
|
|
|
|
2015-08-19 17:31:36 +02:00
|
|
|
Facter.add(:service_provider) do
|
|
|
|
setcode do
|
|
|
|
Puppet::Type.type(:service).newservice(:name => 'dummy')[:provider].to_s
|
|
|
|
end
|
|
|
|
end
|