On 2015-28-02 19:27, Tom Limoncelli wrote:
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",
   }

In Puppet 4.0 (and in 3x with parser=future) you can do this (i.e. merge a hash) directly in the Puppet Language:

$global_options = $haproxy::params::global_options + {
    'log' => "{log_ip} local0"
  }


- henrik


--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

--
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/md07r0%243ar%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to