thias / puppet-php

Puppet module to manage PHP
Other
49 stars 67 forks source link

Add support for PHP 7 on Ubuntu 16.04 #80

Open rclarkburns opened 8 years ago

rclarkburns commented 8 years ago

I opted to add a new facter to get the Ubuntu release. If you have any questions, let me know.

Thanks!

mngoe commented 8 years ago

Sorry, newbie on Puppet, but when I tried your branch, I get :

"Error: Failed to apply catalog: Could not find dependency File[/etc/php/7.0/cli/php.ini] for Package[php-cli] at /etc/puppet/modules/php/manifests/cli.pp:17".

After adding "include '::php::cli'" in my Manifest My file : php.ini really exist in /etc/php/7.0/cli/

rclarkburns commented 8 years ago

Hi @mngoe

Are you trying to modify the ini file in your manifest?

We ended up having to add this type of workaround in our manifest (unrelated to this branch):

case $::osfamily {
    'debian': {
      if $::ubuntu_release == '16.04' {
        file {'/etc/php':
          ensure => directory
        } ->
        file {'/etc/php/7.0':
          ensure => directory
        } ->
        file {'/etc/php/7.0/cli':
          ensure => directory
        }
      } else {
        file {'/etc/php5':
          ensure => directory
        } ->
        file {'/etc/php5/cli':
          ensure => directory
        }
      }
    }
  } ->

do something with ini 

Hope that helps.