Module: AbideDevUtils::Ppt::Hiera

Defined in:
lib/abide_dev_utils/ppt/hiera.rb

Overview

Module for working with Hiera

Defined Under Namespace

Classes: Config, EntryPathLocalFile, Hierarchy, HierarchyEntry, HierarchyEntryPath

Constant Summary collapse

INTERP_PATTERN =
/%{([^{}]+)}/.freeze
FACT_PATTERN =
/%{facts\.([^{}]+)}/.freeze
DEFAULT_FACTER_VERSION =
'4.2'
DEFAULT_CONFIG_FILE =
'hiera.yaml'

Class Method Summary collapse

Class Method Details

.default_datadirObject



31
32
33
# File 'lib/abide_dev_utils/ppt/hiera.rb', line 31

def self.default_datadir
  @default_datadir
end

.default_datadir=(dir) ⇒ Object



24
25
26
27
28
29
# File 'lib/abide_dev_utils/ppt/hiera.rb', line 24

def self.default_datadir=(dir)
  edir = File.expand_path(dir)
  raise "Dir #{edir} not found" unless File.directory?(edir)

  @default_datadir = edir
end

.facter_versionObject



20
21
22
# File 'lib/abide_dev_utils/ppt/hiera.rb', line 20

def self.facter_version
  @facter_version ||= AbideDevUtils::Ppt::FacterUtils.latest_version
end

.facter_version=(version) ⇒ Object



16
17
18
# File 'lib/abide_dev_utils/ppt/hiera.rb', line 16

def self.facter_version=(version)
  @facter_version = AbideDevUtils::Ppt::FacterUtils.use_version(version.to_s)
end