diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-11-02 13:01:00 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-11-02 13:01:00 -0200 |
commit | 5f3ed06fc85c3c9cb8d80c03d157bcc29bf75798 (patch) | |
tree | 6e89619ec894e6649d31cfd6743211e5e2498d17 /manifests/series5.pp | |
parent | 94fb97c148af076ea4c0e3ec710847b335761f30 (diff) | |
download | puppet-php-5f3ed06fc85c3c9cb8d80c03d157bcc29bf75798.tar.gz puppet-php-5f3ed06fc85c3c9cb8d80c03d157bcc29bf75798.tar.bz2 |
Support both PHP 5 and 7, defaults to 5
Diffstat (limited to 'manifests/series5.pp')
-rw-r--r-- | manifests/series5.pp | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/manifests/series5.pp b/manifests/series5.pp new file mode 100644 index 0000000..50ab6f4 --- /dev/null +++ b/manifests/series5.pp @@ -0,0 +1,61 @@ +class php::series5($hardened = true) { + case $::lsbdistcodename { + 'xenial': { + include php::series5::packages::ppa + } + 'stretch': { + include php::series5::packages::dpa + } + default: { + include php::series5::packages::default + } + } + + $folder = $::lsbdistcodename ? { + 'xenial' => '/etc/php/5.6', + 'stretch' => '/etc/php/5.6', + default => '/etc/php5', + } + + file { [ "${folder}", "${folder}/cli", "${folder}/apache2", "${folder}/cli/conf.d", "${folder}/apache2/conf.d" ]: + ensure => directory, + owner => root, + group => root, + mode => '0755', + require => Package['php5'], + } + + #file { "${folder}/cli/php.ini": + # ensure => present, + # owner => root, + # group => root, + # mode => '0644', + # source => [ "puppet:///modules/site_php/cli/${::fqdn}/php.ini", + # "puppet:///modules/site_php/cli/${::domain}/php.ini", + # "puppet:///modules/php/cli/php.${::operatingsystem}_${::lsbdistcodename}.ini", + # "puppet:///modules/php/cli/php.${::operatingsystem}.ini", + # "puppet:///modules/php/cli/php.ini" ], + # require => [ Package['php5'], File["${folder}/cli"] ], + #} + + #file { "${folder}/apache2/php.ini": + # ensure => present, + # owner => root, + # group => root, + # mode => '0644', + # source => [ "puppet:///modules/site_php/apache2/${::fqdn}/php.ini", + # "puppet:///modules/site_php/apache2/${::domain}/php.ini", + # "puppet:///modules/php/apache2/php.${::operatingsystem}_${::lsbdistcodename}.ini", + # "puppet:///modules/php/apache2/php.${::operatingsystem}.ini", + # "puppet:///modules/php/apache2/php.ini" ], + # notify => Service['apache2'], + # require => [ Package['php5'], File["${folder}/apache2"] ], + #} + + include php::resources + include php::series5::defaults + + if $hardened == true { + include php::series5::hardened + } +} |