Class: R10K::Deployment::Config::Loader Private

Inherits:
Object
  • Object
show all
Includes:
Logging
Defined in:
lib/r10k/deployment/config/loader.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary collapse

CONFIG_FILE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'r10k.yaml'
DEFAULT_LOCATION =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

File.join('/etc/puppetlabs/r10k', CONFIG_FILE)

Constants included from Logging

Logging::LOG_LEVELS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Logging

debug_formatter, default_formatter, default_outputter, #logger, #logger_name, parse_level

Constructor Details

#initializeLoader

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Search for a deployment configuration file (r10k.yaml) in several locations



16
17
18
19
# File 'lib/r10k/deployment/config/loader.rb', line 16

def initialize
  @loadpath = []
  populate_loadpath
end

Instance Attribute Details

#loadpathObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10
11
12
# File 'lib/r10k/deployment/config/loader.rb', line 10

def loadpath
  @loadpath
end

Instance Method Details

#searchString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns The path to the first valid configfile.

Returns:

  • (String)

    The path to the first valid configfile



22
23
24
# File 'lib/r10k/deployment/config/loader.rb', line 22

def search
  first = @loadpath.find {|filename| File.file? filename}
end