puppet-php
puppet-php copied to clipboard
Local php settings are always overwritten by hiera data
Affected Puppet, Ruby, OS and module versions/distributions
- Module version: 4.0.0+
How to reproduce (e.g Puppet code you use)
Hiera config with sane global defaults:
---
php::settings:
'PHP/display_errors': Off
Override the global setting in a local manifest:
class mydev {
class ::php {
ensure => 'present',
settings => {
'PHP/display_errors' => 'stderr'
}
}
}
What are you seeing
The local setting in the puppet manifest is overwritten by the global hiera config.
See: https://github.com/voxpupuli/puppet-php/blob/master/manifests/init.pp#L172
$real_settings = deep_merge($settings, hiera_hash('php::settings', {}))
What behavior did you expect instead
Local settings passed to the class should always be able to override global settings. Forcing Hiera data to always overwrite local data seems like the complete opposite of the concept of using Hiera, a hierarchy.
Any additional information you'd like to impart
If this is specifically intended to work like this, how should more specific configuration properties be applied to small groups of servers that need a slightly different configuration, but don't fall into a specific application tier or environment?