puppet-php
puppet-php copied to clipboard
php::config::settings generates error
I may be missing something here, but when I try to use php::config::settings to modify a value in /etc/php.ini it generates an error: php::config::setting { 'Date/date.timezone': file => '/etc/php.ini', value => 'America/Chicago', }
Error 400 on SERVER: Must pass key to Php::Config::Setting[Date/date.timezone] at /etc/puppet/environments/php56/site/modules/courtesy/manifests/profiles/php/php_common.pp:27 on node
I'm using it like this:
class { '::php':
ensure => latest,
dev => false,
pear => false,
manage_repos => true,
settings => {
'Date/date.timezone' => 'America/Sao_Paulo'
},
# ...
}
The example in php::config::setting suggests that $key is a namevar but in fact it isn't. Thus the parameter key has to be set explicitly.
@thorstenk could you provide a PR that updates the docs?
@bastelfreak Sorry, I totally missed the notification about your comment.
I had the impression that the original intent was to use $key as namevar, because of the variable name $split_name in setting.pp#L30. But now I saw the call to assert_private() so I guess updating the docs is better than interpreting this issue as a feature request. The approach of @centric-jim is no intended use, I assume.