example42 / puppet-php

A puppet module for php. According to Example42 NextGen spec.
Other
45 stars 62 forks source link

php::ini not working with centos family systems #94

Closed catalinpan closed 8 years ago

catalinpan commented 9 years ago

Hi,

I could not find a way to configure .ini files using the module. I have updated the ini.pp with the following lines:

 }else{

 case $::osfamily {

 'RedHat', 'Fedora', 'CentOS', 'Scientific', 'SLC', 'Ascendos', 'CloudLinux', 'PSBM', 'OracleLinux', 'OVS', 'OEL', 'Linux' :{

   file { "${config_dir}/${target}":
     ensure  => 'present',
     content => template($template),
     require => Package[$php::package],
     notify  => Service[$service],
   }
   }

 'Ubuntu', 'Debian', 'Mint', 'SLES', 'OpenSuSE': {

   file { "${config_dir}/${sapi_target}/conf.d/${target}":
     ensure  => 'present',
     content => template($template),
     require => Package['php'],
     notify  => Service[$service],
   }
  }
 }
}

In the configuration with the correct hiera_hash I have added:

php::ini:
        'xdebug_disable':
                value:
                        - #zend_extension=xdebug.so
                target: xdebug.ini
                sapi_target: none

and now everything works.

I am not sure if this will satisfy all systems but in case everyone agrees can I create a pull request with this fix?

Many thanks

alvagante commented 9 years ago

PR welcomed, it should work with ay supported OS and don't break backwards compatibility (o systems where it already works)