Browse Source

Fix PHP configuration for MOS 10.0

Change-Id: Ied5b9f6faf11bb033f949b9a358041b28a0cf236
Olivier Bourdon 2 years ago
parent
commit
c98026a2ef

+ 18
- 8
deployment_scripts/puppet/modules/plugin_zabbix/manifests/frontend.pp View File

@@ -18,6 +18,23 @@ class plugin_zabbix::frontend {
18 18
   include phpfpm
19 19
   include plugin_zabbix::params
20 20
 
21
+  $fuel_version = 0 + hiera('fuel_version')
22
+
23
+  $php_conf_hash = {
24
+    'date.timezone'       => 'UTC',
25
+    'memory_limit'        => '256M',
26
+    'max_execution_time'  => '300',
27
+    'post_max_size'       => '16M',
28
+    'upload_max_filesize' => '2M',
29
+    'max_input_time'      => '300',
30
+  }
31
+  if $fuel_version >= 10.0 {
32
+    # PHP 5.6.x version which is used on Xenial deprecates this variable
33
+    # and the recommended value is -1
34
+    # See http://php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data
35
+    $php_conf_hash['always_populate_raw_post_data'] = -1
36
+  }
37
+
21 38
   service { $plugin_zabbix::params::frontend_service:
22 39
     ensure     => 'running',
23 40
     enable     => true,
@@ -111,14 +128,7 @@ class plugin_zabbix::frontend {
111 128
         listen    => sprintf('127.0.0.1:%s', $plugin_zabbix::params::zabbix_ports['fcgi']),
112 129
         require   => Package[$plugin_zabbix::params::php_fpm_pkg],
113 130
         notify    => Service[$plugin_zabbix::params::php_fpm_service],
114
-        php_value => {
115
-          'date.timezone'       => 'UTC',
116
-          'memory_limit'        => '256M',
117
-          'max_execution_time'  => '300',
118
-          'post_max_size'       => '16M',
119
-          'upload_max_filesize' => '2M',
120
-          'max_input_time'      => '300',
121
-        },
131
+        php_value => $php_conf_hash,
122 132
       }
123 133
 
124 134
       file_line { 'set expose_php to off':

Loading…
Cancel
Save