summaryrefslogtreecommitdiff
path: root/lib/facter
diff options
context:
space:
mode:
Diffstat (limited to 'lib/facter')
-rw-r--r--lib/facter/service_provider.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/facter/service_provider.rb b/lib/facter/service_provider.rb
new file mode 100644
index 0000000..54db937
--- /dev/null
+++ b/lib/facter/service_provider.rb
@@ -0,0 +1,14 @@
+# 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:
+#
+Facter.add(:service_provider) do
+ setcode do
+ Puppet::Type.type(:service).newservice(:name => 'dummy')[:provider].to_s
+ end
+end