Module: Puppet::Sap::Facts
- Defined in:
- lib/puppet/sap/facts.rb
Overview
COntains the control code needed to actually add facts. Note that the fact collection code is primarily located in the inner module ‘Instances`.
Defined Under Namespace
Modules: Instances
Class Method Summary collapse
-
.install ⇒ NilClass
Calls the Facter DSL and dynamically adds the local facts.
Class Method Details
.install ⇒ NilClass
Calls the Facter DSL and dynamically adds the local facts.
This helps facilitate testing of the ruby code presented by this module
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/puppet/sap/facts.rb', line 15 def self.install Puppet::Sap::Facts::Instances.initialize sid_data = Puppet::Sap::Facts::Instances.sid_data inst_classes = Puppet::Sap::Facts::Instances.inst_classes Facter.add(:sap, type: :aggregate) do confine kernel: 'Linux' unless sid_data.empty? chunk(:sid_hash) do { sid_hash: sid_data } end end unless inst_classes.empty? chunk(:inst_classes) do { inst_classes: inst_classes } end end end end |