]> gitweb.fluxo.info Git - puppet-apache.git/commitdiff
Adds apache::config
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 12 Apr 2018 17:57:18 +0000 (14:57 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 12 Apr 2018 17:57:18 +0000 (14:57 -0300)
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..acfa305
--- /dev/null
@@ -0,0 +1,23 @@
+define apache::config(
+  $content = '',
+  $source  = '',
+  $ensure  = 'present',
+) {
+  $conf_d = $::apache::conf_d
+
+  file { "${conf}/${name}.conf":
+    mode    => '0644',
+    owner   => 'root',
+    group   => 'root',
+    ensure  => $ensure,
+    content => $content ? {
+      ''      => undef,
+      default => "${content}\n",
+    },
+    source => $source ? {
+      ''      => undef,
+      default => ${source},
+    },
+    notify => Service['apache2'],
+  }
+}