lib/bolt/config.rb
# Merge configuration from all sources into a single hash. Precedence from lowest to highest:
# defaults, system-wide, user-level, project-level, CLI overrides
Merge configuration from all sources into a single hash. Precedence from lowest to highest:
defaults, system-wide, user-level, project-level, CLI overrides
Merge configuration from all sources into a single hash . Precedence from lowest to highest : defaults system - wide user - level project - level CLI overrides
def merge_config_layers(*config_data)
      config_data.inject({}) do |acc, config|
        acc.merge(config) do |key, val1, val2|
          case key
          when 'plugins'
            val1.merge(val2) { |_, v1, v2| v1.merge(v2) }
          when *TRANSPORT_CONFIG.keys
            Bolt::Util.deep_merge(val1, val2)
          when 'apply-settings', 'log', 'plugin-hooks', 'puppetdb'
            val1.merge(val2)
          when 'disable-warnings'
            val1.concat(val2)
          when 'analytics'
            val1 && val2
          else
            val2
          end
        end
      end
    end
def merge_config_layers ( * config_data ) config_data . inject ( { } ) do | acc , config | acc . merge ( config ) do | key , val1 , val2 | case key when 'plugins' val1 . merge ( val2 ) { | _ , v1 , v2 | v1 . merge ( v2 ) } when * TRANSPORT_CONFIG . keys Bolt :: Util . deep_merge ( val1 , val2 ) when 'apply-settings' , 'log' , 'plugin-hooks' , 'puppetdb' val1 . merge ( val2 ) when 'disable-warnings' val1 . concat ( val2 ) when 'analytics' val1 && val2 else val2 end end end end
Merge configuration from all sources into a single hash.
Merge configuration from all sources into a single hash .
# Plugin config is shallow merged for each plugin # Transports are deep merged # Hash values are shallow merged # Disabled warnings are concatenated # All other values are overwritten
config_data
<not_specific>