Defined Type: php::config::setting
- Defined in:
- manifests/config/setting.pp
Overview
Configure php.ini settings
=== Parameters
[key]
The key of the value, like ini_setting
[file] The path to ini file
[value] The value to set
=== Examples
php::config::setting { 'Date/date.timezone': file => '$full_path_to_ini_file' value => 'Europe/Berlin' }
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'manifests/config/setting.pp', line 21
define php::config::setting(
$key,
$value,
Stdlib::Absolutepath $file,
) {
if $caller_module_name != $module_name {
warning('php::config::setting is private')
}
$split_name = split($key, '/')
if count($split_name) == 1 {
$section = '' # lint:ignore:empty_string_assignment
$setting = $split_name[0]
} else {
$section = $split_name[0]
$setting = $split_name[1]
}
if $value == undef {
$ensure = 'absent'
} else {
$ensure = 'present'
}
ini_setting { $name:
ensure => $ensure,
value => $value,
path => $file,
section => $section,
setting => $setting,
}
}
|