diff options
author | Bryan Jen <bryan.jen@gmail.com> | 2015-10-01 10:27:51 -0700 |
---|---|---|
committer | Bryan Jen <bryan.jen@gmail.com> | 2015-10-01 10:27:51 -0700 |
commit | e1a9bf506359d1e84d13b857ca6fa5e556ceeddd (patch) | |
tree | 75792fd62bfddb451b0de6695b873cc2e3c5d002 /lib/facter | |
parent | 76db98120acab12d5aab3adaff6d2aa1d970c1e8 (diff) | |
parent | ce6e8679b68f984415adc90d74083fd787234709 (diff) | |
download | puppet-stdlib-e1a9bf506359d1e84d13b857ca6fa5e556ceeddd.tar.gz puppet-stdlib-e1a9bf506359d1e84d13b857ca6fa5e556ceeddd.tar.bz2 |
Merge pull request #534 from asasfu/feature/package_provider_fact
Add package_provider fact
Diffstat (limited to 'lib/facter')
-rw-r--r-- | lib/facter/package_provider.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/facter/package_provider.rb b/lib/facter/package_provider.rb new file mode 100644 index 0000000..9a4ec65 --- /dev/null +++ b/lib/facter/package_provider.rb @@ -0,0 +1,17 @@ +# Fact: package_provider +# +# Purpose: Returns the default provider Puppet will choose to manage packages +# on this system +# +# Resolution: Instantiates a dummy package resource and return the provider +# +# Caveats: +# +require 'puppet/type' +require 'puppet/type/package' + +Facter.add(:package_provider) do + setcode do + Puppet::Type.type(:package).newpackage(:name => 'dummy')[:provider].to_s + end +end |