diff --git a/manifests/params.pp b/manifests/params.pp index 75fbfd5..bba24cc 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -3,19 +3,34 @@ class php::params { case $::osfamily { 'Debian': { - $php_package_name = 'php5' - $php_apc_package_name = 'php-apc' - $common_package_name = 'php5-common' - $cli_package_name = 'php5-cli' - $cli_inifile = '/etc/php5/cli/php.ini' - $php_conf_dir = '/etc/php5/mods-available' - $fpm_package_name = 'php5-fpm' - $fpm_service_name = 'php5-fpm' + if $::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemmajrelease, '16.04') >= 0 { + $php_package_name = 'php' + $php_apc_package_name = 'php-apcu' + $common_package_name = 'php-common' + $cli_package_name = 'php-cli' + $cli_inifile = '/etc/php/7.0/cli/php.ini' + $php_conf_dir = '/etc/php/7.0/mods-available' + $fpm_package_name = 'php-fpm' + $fpm_service_name = 'php7.0-fpm' + $fpm_pool_dir = '/etc/php/7.0/fpm/pool.d' + $fpm_conf_dir = '/etc/php/7.0/fpm' + $fpm_error_log = '/var/log/php7.0-fpm.log' + $fpm_pid = '/run/php/php7.0-fpm.pid' + } else { + $php_package_name = 'php5' + $php_apc_package_name = 'php-apc' + $common_package_name = 'php5-common' + $cli_package_name = 'php5-cli' + $cli_inifile = '/etc/php5/cli/php.ini' + $php_conf_dir = '/etc/php5/mods-available' + $fpm_package_name = 'php5-fpm' + $fpm_service_name = 'php5-fpm' + $fpm_pool_dir = '/etc/php5/fpm/pool.d' + $fpm_conf_dir = '/etc/php5/fpm' + $fpm_error_log = '/var/log/php5-fpm.log' + $fpm_pid = '/var/run/php5-fpm.pid' + } $fpm_service_restart = 'restart' - $fpm_pool_dir = '/etc/php5/fpm/pool.d' - $fpm_conf_dir = '/etc/php5/fpm' - $fpm_error_log = '/var/log/php5-fpm.log' - $fpm_pid = '/var/run/php5-fpm.pid' $httpd_package_name = 'apache2' $httpd_service_name = 'apache2' $httpd_conf_dir = '/etc/apache2/conf.d'