On Sat, Feb 28, 2015 at 2:25 PM, Dan White wrote:
> $new_hash = {
> 'log' => "${log_ip} local0",
> }
>
> $global_options = merge ( $haproxy::params::global_options, $new_hash )
>
Thanks, Dan! I'll do that while I wait for Puppet 4.0 (or when I can use
the future parser).
On Sun, Mar 1, 2015
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::glob
On 2/28/15 1:27 PM, 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
Make a hash with the update in it and then merge them (needs stdlib)
Like this:
$new_hash = {
'log' => "${log_ip} local0",
}
$global_options = merge ( $haproxy::params::global_options, $new_hash )
https://forge.puppetlabs.com/puppetlabs/stdlib#reference
• merge: Merges two or more hashes tog
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} loc