]> gitweb.fluxo.info Git - puppet-php.git/commitdiff
Adds support for ubuntu xenial
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 8 Jun 2016 19:00:58 +0000 (16:00 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 8 Jun 2016 19:00:58 +0000 (16:00 -0300)
manifests/init.pp
manifests/packages/default.pp [new file with mode: 0644]
manifests/packages/xenial.pp [new file with mode: 0644]

index b2fb4ba7487db0b6ef695837243b0b435bb84c33..0cf39ed99bc776ae8fdbce750ef5c95ebefdc85e 100644 (file)
 # 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 (file)
index 0000000..e1f2bf1
--- /dev/null
@@ -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 (file)
index 0000000..41f4420
--- /dev/null
@@ -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'],
+  }
+}