summaryrefslogtreecommitdiff
path: root/lib/facter/service_provider.rb
blob: a11792115c87337d7abda989ce490f68ea82901d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 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:
#
require 'puppet/type'
require 'puppet/type/service'

Facter.add(:service_provider) do
  setcode do
    Puppet::Type.type(:service).newservice(:name => 'dummy')[:provider].to_s
  end
end