]> gitweb.fluxo.info Git - puppet-php.git/commitdiff
Adds php::config
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 3 Nov 2015 20:15:57 +0000 (18:15 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 3 Nov 2015 20:15:57 +0000 (18:15 -0200)
manifests/config.pp [new file with mode: 0644]

diff --git a/manifests/config.pp b/manifests/config.pp
new file mode 100644 (file)
index 0000000..08b80fb
--- /dev/null
@@ -0,0 +1,13 @@
+define php::config($value, $ensure = 'present', $sapi = '') {
+  file { "/etc/php5/${sapi}/conf.d/${name}.ini":
+    ensure  => $ensure,
+    owner   => root,
+    group   => root,
+    mode    => 0644,
+    content => "${name}=${value}\n",
+    notify  => $sapi ? {
+      'apache2' => Service['apache2'],
+      default   => undef,
+    },
+  }
+}