Skip to content

Commit

Permalink
refac(lookup) deprecate hiera_hash
Browse files Browse the repository at this point in the history
Use the lookup function
Use deep merge
  • Loading branch information
minorOffense authored Jan 31, 2018
1 parent fec454c commit 2f843dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,16 @@
$real_fpm_package = pick($fpm_package, "${package_prefix}${::php::params::fpm_package_suffix}")

# Deep merge global php settings
$real_settings = deep_merge($settings, hiera_hash('php::settings', {}))
$real_settings = deep_merge($settings, lookup('php::settings', {value_type => Hash, merge => 'deep', default_value => {}}))

# Deep merge global php extensions
$real_extensions = deep_merge($extensions, hiera_hash('php::extensions', {}))
$real_extensions = deep_merge($extensions, lookup('php::extensions', {value_type => Hash, merge => 'deep', default_value => {}}))

# Deep merge fpm_pools
$real_fpm_pools = deep_merge($fpm_pools, hiera_hash('php::fpm_pools', {}))
$real_fpm_pools = deep_merge($fpm_pools, lookup('php::fpm_pools', {value_type => Hash, merge => 'deep', default_value => {}}))

# Deep merge fpm_global_pool_settings
$real_fpm_global_pool_settings = deep_merge($fpm_global_pool_settings, hiera_hash('php::fpm_global_pool_settings', {}))
$real_fpm_global_pool_settings = deep_merge($fpm_global_pool_settings, lookup('php::fpm_global_pool_settings', {value_type => Hash, merge => 'deep', default_value => {}}))

if $manage_repos {
class { '::php::repo': }
Expand Down

0 comments on commit 2f843dc

Please sign in to comment.