Browse Source

Create a httpd::mod defined type

This allows for before => Service['httpd'] on every resource without
being explicit.

Co-Authored-By: Bruno Tavares <btavare@thoughtworks.com>
Co-Authored-By: Glauco Oliveira <gvinici@thoughtworks.com>

Change-Id: I0e991a7a63317e608cc6ef35b58dc79b518ba863
Spencer Krum 3 years ago
parent
commit
5b0ebdf555
1 changed files with 17 additions and 0 deletions
  1. 17
    0
      manifests/mod.pp

+ 17
- 0
manifests/mod.pp View File

@@ -0,0 +1,17 @@
1
+# defined type to wrap httpd_mod
2
+# httpd_mod doesn't ensure that the service is up first, this does
3
+define httpd::mod (
4
+  $ensure = present,
5
+) {
6
+
7
+  if $::osfamily == 'Debian' {
8
+    httpd_mod { $name:
9
+      ensure => $ensure,
10
+      notify => Service['httpd'],
11
+    }
12
+  }
13
+  if $::osfamily == 'RedHat' {
14
+    debug('Enabling modules is a noop on redhat, doing nothing')
15
+  }
16
+
17
+}

Loading…
Cancel
Save