I want to copy a hash to a variable but change some settings along the way.
For example: I have $haproxy::params::global_options (which is a hash) and I want to create a copy with some changes. I tried this: $global_options = $haproxy::params::global_options += { 'log' => "${log_ip} local0", } But that gives me: Error: Syntax error at '+='; expected '}' at ... If I do: $global_options = $haproxy::params::global_options $global_options['log'] = "${log_ip} local0" This gives me: Error: Assigning to the hash 'global_options' with an existing key 'log' is forbidden Suggestions? Tom -- Email: t...@whatexit.org Work: tlimonce...@stackoverflow.com Skype: YesThatTom Blog: http://EverythingSysadmin.com -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAHVFxgnmdYrNOUdujza-EE0M5KyMZDR%3Dzt3wB-5tvbh8%3DaC4-w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.