给定的是 hieradata 中的散列值:
profile::jdbc::connections
connection_name1:
username: 'user1'
password: 'pass1'
connection_name2:
username: 'user2'
password: 'pass2'
Run Code Online (Sandbox Code Playgroud)
以及 puppet 代码中的默认值散列:
$jdbc_default = {
'testWhileIdle' => true,
'testOnBorrow' => true,
'testOnReturn' => false,
'timeBetweenEvictionRunsMillis'=> '30000',
'maxActive' => '20',
'maxWait' => '10000',
'initialSize' => '5',
'removeAbandonedTimeout' => '600',
'removeAbandoned' => false,
'logAbandoned' => true,
'minEvictableIdleTimeMillis' => '30001',
}
Run Code Online (Sandbox Code Playgroud)
如何将默认值添加到连接哈希中的每个哈希?
结果也可以是一个散列数组,但是一个与连接散列中的键相同的散列会很好。
puppet ×1