diff options
| author | Silvio Rhatto <rhatto@riseup.net> | 2016-06-08 16:00:58 -0300 | 
|---|---|---|
| committer | Silvio Rhatto <rhatto@riseup.net> | 2016-06-08 16:00:58 -0300 | 
| commit | 8b4708612dc9524d00f293c137528be8552c4e56 (patch) | |
| tree | 71f253c00ad08e78ce992379e1c6439b2940eccc /manifests | |
| parent | db442890b32a9878cb969a01a74f46e47c8e8af7 (diff) | |
| download | puppet-php-8b4708612dc9524d00f293c137528be8552c4e56.tar.gz puppet-php-8b4708612dc9524d00f293c137528be8552c4e56.tar.bz2 | |
Adds support for ubuntu xenial
Diffstat (limited to 'manifests')
| -rw-r--r-- | manifests/init.pp | 26 | ||||
| -rw-r--r-- | manifests/packages/default.pp | 22 | ||||
| -rw-r--r-- | manifests/packages/xenial.pp | 22 | 
3 files changed, 51 insertions, 19 deletions
| diff --git a/manifests/init.pp b/manifests/init.pp index b2fb4ba..0cf39ed 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -17,25 +17,13 @@  # along with this program.  If not, see <http://www.gnu.org/licenses/>.  class php { -  # The needed packages: we could also try libapache2-mod-php5filter -  package { [ 'php5', 'php5-mysql', 'php5-sqlite', 'php5-cli', 'php5-curl', 'php5-gmp', 'libapache2-mod-php5' ]: -    ensure => installed, -  } - -  # Optional packages -  package { [ "php5-gd", "php5-imagick" ]: -    ensure => installed, -  } - -  # Not available anymore -  package { 'php5-suhosin': -    ensure => absent, -  } - -  # The needed apache modules -  apache::module { 'php5': -    ensure  => present, -    require => Package['libapache2-mod-php5'], +  case $::lsbdistcodename { +    'xenial': { +      include php::packages::xenial +    } +    default: { +      include php::packages::default +    }    }    file { '/etc/php5/cli/php.ini': diff --git a/manifests/packages/default.pp b/manifests/packages/default.pp new file mode 100644 index 0000000..e1f2bf1 --- /dev/null +++ b/manifests/packages/default.pp @@ -0,0 +1,22 @@ +class php::packages::default { +  # The needed packages: we could also try libapache2-mod-php5filter +  package { [ 'php5', 'php5-mysql', 'php5-sqlite', 'php5-cli', 'php5-curl', 'php5-gmp', 'libapache2-mod-php5' ]: +    ensure => installed, +  } + +  # Optional packages +  package { [ "php5-gd", "php5-imagick" ]: +    ensure => installed, +  } + +  # Not available anymore +  package { 'php5-suhosin': +    ensure => absent, +  } + +  # The needed apache modules +  apache::module { 'php5': +    ensure  => present, +    require => Package['libapache2-mod-php5'], +  } +} diff --git a/manifests/packages/xenial.pp b/manifests/packages/xenial.pp new file mode 100644 index 0000000..41f4420 --- /dev/null +++ b/manifests/packages/xenial.pp @@ -0,0 +1,22 @@ +class php::packages::xenial { +  # The needed packages: we could also try libapache2-mod-php5.6filter +  package { [ 'php5.6', 'php5.6-mysql', 'php5.6-sqlite', 'php5.6-cli', 'php5.6-curl', 'php5.6-gmp', 'libapache2-mod-php5.6' ]: +    ensure => installed, +  } + +  # Optional packages +  package { [ "php5.6-gd", "php5.6-imagick" ]: +    ensure => installed, +  } + +  # Not available anymore +  package { 'php5.6-suhosin': +    ensure => absent, +  } + +  # The needed apache modules +  apache::module { 'php5.6': +    ensure  => present, +    require => Package['libapache2-mod-php5.6'], +  } +} | 
