diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-01-27 16:19:33 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-01-27 16:19:33 -0200 |
commit | 46938b8dbc5be5e17657ad7eab51f737a89c7ec5 (patch) | |
tree | 04b83ed1241ad65fb828479532dab84a4c5b73c8 | |
parent | 9ba42984bc3d423c60b39997ed91df01f4797b15 (diff) | |
download | puppet-php-46938b8dbc5be5e17657ad7eab51f737a89c7ec5.tar.gz puppet-php-46938b8dbc5be5e17657ad7eab51f737a89c7ec5.tar.bz2 |
Coding style; squeeze upgrade
-rw-r--r-- | manifests/init.pp | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 561f310..7813b41 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,18 +1,18 @@ # This module is distributed under the GNU Affero General Public License: -# +# # PHP module for puppet # Copyright (C) 2009 Sarava Group -# +# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. -# +# # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. @@ -20,32 +20,39 @@ class php { include pear # The needed packages - package { [ "php5", "php5-mysql", "php5-cli", "php5-ffmpeg", "php5-curl", "php5-gmp" ]: + package { [ 'php5', 'php5-mysql', 'php5-cli', 'php5-ffmpeg', 'php5-curl', 'php5-gmp' ]: ensure => installed, } # Not available on wheezy - package { "php5-suhosin": - ensure => $lsbdistcodename ? { + package { 'php5-suhosin': + ensure => $::lsbdistcodename ? { 'wheezy' => absent, default => present, }, } + # Useful when upgrading from squeeze + if $::lsbdistcodename == 'wheezy' { + file { [ '/etc/php5/apache2/conf.d/suhosin.ini', '/etc/php5/conf.d/suhosin.ini' ]: + ensure => absent, + } + } + # The needed apache modules - apache::module { "php5": + apache::module { 'php5': ensure => present, } - file { "/etc/php5/cli/php.ini": + file { '/etc/php5/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", + 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-cli'], } @@ -55,10 +62,10 @@ class php { 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/cli/php.${operatingsystem}_${lsbdistcodename}.ini", - "puppet:///modules/php/cli/php.${operatingsystem}.ini", + source => [ "puppet:///modules/site_php/apache2/${::fqdn}/php.ini", + "puppet:///modules/site_php/apache2/${::domain}/php.ini", + "puppet:///modules/php/cli/php.${::operatingsystem}_${::lsbdistcodename}.ini", + "puppet:///modules/php/cli/php.${::operatingsystem}.ini", "puppet:///modules/php/apache2/php.ini" ], notify => Service['apache2'], require => Package['php5'], @@ -66,7 +73,7 @@ class php { } class php::imap inherits php { - package { "php5-imap": + package { 'php5-imap': ensure => installed, } } |