lib/hieracles/config.rb in hieracles-0.1.4 vs lib/hieracles/config.rb in hieracles-0.1.5

- old
+ new

@@ -8,11 +8,11 @@ module Config include Hieracles::Utils extend self attr_reader :extraparams, :server, :classpath, :scope, - :modulepath, :hierafile, :basepath, :encpath, :format + :modulepath, :hierafile, :basepath, :encpath, :format, :interactive def load(options) @optionfile = options[:config] || defaultconfig @extraparams = extract_params(options[:params]) initconfig(@optionfile) unless File.exist? @optionfile @@ -25,9 +25,10 @@ @hierafile = options[:hierafile] || values['hierafile'] || 'hiera.yaml' @format = (options[:format] || values['format'] || 'console').capitalize facts_file = options[:yaml_facts] || options[:json_facts] facts_format = options[:json_facts] ? :json : :yaml @scope = sym_keys((facts_file && load_facts(facts_file, facts_format)) || values['defaultscope'] || {}) + @interactive = options[:interactive] || values['interactive'] end def initconfig(file) FileUtils.mkdir_p(File.dirname(file)) File.open(file, 'w') do |f|