Puppet: Set date.timezone for PHP in a separate INI file
This commit is contained in:
parent
af6def7d7f
commit
b4861fe689
|
@ -20,24 +20,11 @@ class php {
|
||||||
|
|
||||||
package { 'php':
|
package { 'php':
|
||||||
ensure => latest,
|
ensure => latest,
|
||||||
require => Package['apache'],
|
|
||||||
notify => Service['apache']
|
|
||||||
}
|
|
||||||
# TODO(el): Always executed. Should be a resource
|
|
||||||
-> exec { 'php-timezone':
|
|
||||||
command => 'sed -re $\'s#^;?(date\\.timezone =).*$#\\1 "UTC"#\' -i /etc/php.ini',
|
|
||||||
notify => Service['apache'],
|
notify => Service['apache'],
|
||||||
|
require => Package['apache'],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/php.d/error_reporting.ini':
|
php::phpd { ['error_reporting', 'timezone', 'xdebug_settings' ]:
|
||||||
content => template('php/error_reporting.ini.erb'),
|
|
||||||
require => Package['php'],
|
require => Package['php'],
|
||||||
notify => Service['apache']
|
|
||||||
}
|
|
||||||
|
|
||||||
file { '/etc/php.d/xdebug_settings.ini':
|
|
||||||
content => template('php/xdebug_settings.ini.erb'),
|
|
||||||
require => Package['php'],
|
|
||||||
notify => Service['apache']
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
# define: php::phpd
|
||||||
|
#
|
||||||
|
# Provision php.d config
|
||||||
|
#
|
||||||
|
# Parameters:
|
||||||
|
#
|
||||||
|
# Actions:
|
||||||
|
#
|
||||||
|
# Requires:
|
||||||
|
#
|
||||||
|
# Sample Usage:
|
||||||
|
#
|
||||||
|
define php::phpd {
|
||||||
|
|
||||||
|
include php
|
||||||
|
|
||||||
|
file { "/etc/php.d/$name.ini":
|
||||||
|
content => template("php/$name.ini.erb"),
|
||||||
|
notify => Service['apache'],
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
date.timezone = "UTC"
|
Loading…
Reference in New Issue