Method: Puppet::Parser::Scope#merge_settings
- Defined in:
- lib/puppet/parser/scope.rb
#merge_settings(env_name, set_in_this_scope = true) ⇒ Object
Merge all settings for the given env_name into this scope
723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 |
# File 'lib/puppet/parser/scope.rb', line 723 def merge_settings(env_name, set_in_this_scope = true) settings = Puppet.settings table = effective_symtable(false) global_table = compiler.qualified_variables all_local = {} settings.each_key do |name| next if :name == name key = name.to_s value = transform_setting(settings.value_sym(name, env_name)) if set_in_this_scope table[key] = value end all_local[key] = value # also write the fqn into global table for direct lookup global_table["settings::#{key}"] = value end # set the 'all_local' - a hash of all settings global_table["settings::all_local"] = all_local nil end |