Module: Facter::Util::Config

### Home Classes Methods

### In Files

- lib/facter/util/config.rb

### Methods

- ::ext_fact_loader
- ::ext_fact_loader=
- ::external_facts_dirs
- ::is_mac?
- ::is_windows?
- ::windows_data_dir

### Files

- LICENSE
- Rakefile
- THANKS

### Class/Module Index

Quicksearch

- Facter
- Facter::Application
- Facter::Manufacturer
- Facter::Memory
- Facter::NetMask
- Facter::Util
- Facter::Util::CFPropertyList
- Facter::Util::CFPropertyList::CFArray
- Facter::Util::CFPropertyList::CFBoolean
- Facter::Util::CFPropertyList::CFData
- Facter::Util::CFPropertyList::CFDate
- Facter::Util::CFPropertyList::CFDictionary
- Facter::Util::CFPropertyList::CFInteger
- Facter::Util::CFPropertyList::CFReal
- Facter::Util::CFPropertyList::CFString
- Facter::Util::CFPropertyList::CFType
- Facter::Util::CFPropertyList::XML
- Facter::Util::Collection
- Facter::Util::CompositeLoader
- Facter::Util::Config
- Facter::Util::Confine
- Facter::Util::DirectoryLoader
- Facter::Util::DirectoryLoader::NoSuchDirectoryError
- Facter::Util::EC2
- Facter::Util::Fact
- Facter::Util::FileRead
- Facter::Util::IP
- Facter::Util::IP::Windows
- Facter::Util::IP::Windows::Bindings4
- Facter::Util::IP::Windows::Bindings6
- Facter::Util::Loader
- Facter::Util::Macaddress
- Facter::Util::Macaddress::Darwin
- Facter::Util::Macaddress::Windows
- Facter::Util::Macosx
- Facter::Util::MonkeyPatches
- Facter::Util::MonkeyPatches::Lines
- Facter::Util::NothingLoader
- Facter::Util::Parser
- Facter::Util::Parser::Base
- Facter::Util::Parser::JsonParser
- Facter::Util::Parser::KeyValuePairOutputFormat
- Facter::Util::Parser::NothingParser
- Facter::Util::Parser::PowershellParser
- Facter::Util::Parser::ScriptParser
- Facter::Util::Parser::TextParser
- Facter::Util::Parser::YamlParser
- Facter::Util::Processor
- Facter::Util::Registry
- Facter::Util::Resolution
- Facter::Util::SolarisZones
- Facter::Util::Uptime
- Facter::Util::Values
- Facter::Util::Virtual
- Facter::Util::Vlans
- Facter::Util::WMI
- Facter::Util::Xendomains
- Plist
- Plist::Emit
- Plist::Listener
- Plist::PArray
- Plist::PData
- Plist::PDate
- Plist::PDict
- Plist::PFalse
- Plist::PInteger
- Plist::PKey
- Plist::PList
- Plist::PReal
- Plist::PString
- Plist::PTag
- Plist::PTrue
- Plist::StreamParser
- CFFormatError
- CFPlistError
- CFTypeError
- IO
- Object
- String

No matching classes.

# Facter::Util::Config

A module to return config related data

### Public Class Methods

ext_fact_loader() click to toggle source

    # File lib/facter/util/config.rb, line 7
    def self.ext_fact_loader
      @ext_fact_loader || Facter::Util::DirectoryLoader.default_loader
    end

ext_fact_loader=(loader) click to toggle source

    # File lib/facter/util/config.rb, line 11
    def self.ext_fact_loader=(loader)
      @ext_fact_loader = loader
    end

external_facts_dirs() click to toggle source

    # File lib/facter/util/config.rb, line 32
    def self.external_facts_dirs
      windows_dir = windows_data_dir
      if windows_dir.nil? then
        ["/etc/facter/facts.d", "/etc/puppetlabs/facter/facts.d"]
      else
        [File.join(windows_dir, 'PuppetLabs', 'facter', 'facts.d')]
      end
    end

is_mac?() click to toggle source

    # File lib/facter/util/config.rb, line 15
    def self.is_mac?
      RbConfig::CONFIG['host_os'] =~ /darwin/
    end

is_windows?() click to toggle source

Returns true if OS is windows

    # File lib/facter/util/config.rb, line 20
    def self.is_windows?
      RbConfig::CONFIG['host_os'] =~ /mswin|win32|dos|mingw|cygwin/
    end

windows_data_dir() click to toggle source

    # File lib/facter/util/config.rb, line 24
    def self.windows_data_dir
      if Dir.const_defined? 'COMMON_APPDATA' then
        Dir::COMMON_APPDATA
      else
        nil
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.