lib/r10k/deployment/config/loader.rb in r10k-1.5.1 vs lib/r10k/deployment/config/loader.rb in r10k-2.0.0
- old
+ new
@@ -9,27 +9,19 @@
attr_reader :loadpath
CONFIG_FILE = 'r10k.yaml'
DEFAULT_LOCATION = File.join('/etc/puppetlabs/r10k', CONFIG_FILE)
- OLD_DEFAULT_LOCATION = File.join('/etc', CONFIG_FILE)
# Search for a deployment configuration file (r10k.yaml) in several locations
def initialize
@loadpath = []
populate_loadpath
end
# @return [String] The path to the first valid configfile
def search
-
- # If both default files are present, issue a warning.
- if (File.file? DEFAULT_LOCATION) && (File.file? OLD_DEFAULT_LOCATION)
- logger.warn "Both #{DEFAULT_LOCATION} and #{OLD_DEFAULT_LOCATION} configuration files exist."
- logger.warn "#{DEFAULT_LOCATION} will be used."
- end
-
first = @loadpath.find {|filename| File.file? filename}
end
private
@@ -38,12 +30,9 @@
# Add the current directory for r10k.yaml
@loadpath << File.join(Dir.getwd, CONFIG_FILE)
# Add the AIO location for of r10k.yaml
@loadpath << DEFAULT_LOCATION
-
- # Add the old default location last.
- @loadpath << OLD_DEFAULT_LOCATION
@loadpath
end
end
end