Sha256: 79f03e95540245496038c17849acf659a82b58c950e8754f8ff7ccee7a102141

Contents?: true

Size: 1 KB

Versions: 13

Compression:

Stored size: 1 KB

Contents

begin
  require 'corl'

  # Load network if it exists
  if CORL.admin?
    network_path   = Facter.value("corl_network")
    network_config = CORL.config(:network, { :directory => network_path, :name => network_path })    
    network        = CORL.network(CORL.sha1(network_config), network_config, :default)

    if network && node = network.local_node
      Facter.add(:corl_provider) do
        setcode do
          node.plugin_provider
        end  
      end
      
      corl_facts = CORL::Util::Data.merge([ {
        :corl_identity    => "test",
        :corl_stage       => "maintain",
        :corl_type        => "core",
        :corl_environment => "development"
      }, node[:facts] ])
      
      CORL::Util::Data.hash(corl_facts).each do |name, value|    
        Facter.add(name) do
          confine :kernel => :linux # TODO: Extend this to work with more systems
    
          setcode do
            value
          end
        end
      end
    end
  end
rescue # Prevent abortions if does not exist
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
corl-0.4.16 lib/facter/custom_facts.rb
corl-0.4.15 lib/facter/custom_facts.rb
corl-0.4.14 lib/facter/custom_facts.rb
corl-0.4.13 lib/facter/custom_facts.rb
corl-0.4.12 lib/facter/custom_facts.rb
corl-0.4.11 lib/facter/custom_facts.rb
corl-0.4.10 lib/facter/custom_facts.rb
corl-0.4.9 lib/facter/custom_facts.rb
corl-0.4.8 lib/facter/custom_facts.rb
corl-0.4.7 lib/facter/custom_facts.rb
corl-0.4.6 lib/facter/custom_facts.rb
corl-0.4.5 lib/facter/custom_facts.rb
corl-0.4.4 lib/facter/custom_facts.rb