forked from bigcommerce/puppet-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(global) Add php.ini global settings
Fixes voxpupuli#132.
- Loading branch information
1 parent
5e75170
commit 2659ae2
Showing
3 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Install and configure mod_php for fpm | ||
# | ||
# === Parameters | ||
# | ||
# [*inifile*] | ||
# Absolute path to the global php.ini file. Defaults | ||
# to the OS specific default location as defined in params. | ||
# [*settings*] | ||
# Hash of settings to apply to the global php.ini file. | ||
# Defaults to OS specific defaults (i.e. add nothing) | ||
# | ||
|
||
# | ||
class php::global( | ||
$inifile = $::php::params::config_root_inifile, | ||
$settings = {} | ||
) inherits ::php::params { | ||
|
||
if $caller_module_name != $module_name { | ||
warning('php::global is private') | ||
} | ||
|
||
validate_absolute_path($inifile) | ||
validate_hash($settings) | ||
|
||
# No deep merging required since the settings we have are the global settings. | ||
$real_settings = $settings | ||
|
||
::php::config { 'global': | ||
file => $inifile, | ||
config => $real_settings, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters