From 5b0ebdf5558ccf80a6126bd7d06c26b03539d404 Mon Sep 17 00:00:00 2001 From: Spencer Krum Date: Tue, 25 Aug 2015 11:52:02 -0700 Subject: [PATCH] Create a httpd::mod defined type This allows for before => Service['httpd'] on every resource without being explicit. Co-Authored-By: Bruno Tavares Co-Authored-By: Glauco Oliveira Change-Id: I0e991a7a63317e608cc6ef35b58dc79b518ba863 --- manifests/mod.pp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 manifests/mod.pp diff --git a/manifests/mod.pp b/manifests/mod.pp new file mode 100644 index 0000000..eaa6069 --- /dev/null +++ b/manifests/mod.pp @@ -0,0 +1,17 @@ +# defined type to wrap httpd_mod +# httpd_mod doesn't ensure that the service is up first, this does +define httpd::mod ( + $ensure = present, +) { + + if $::osfamily == 'Debian' { + httpd_mod { $name: + ensure => $ensure, + notify => Service['httpd'], + } + } + if $::osfamily == 'RedHat' { + debug('Enabling modules is a noop on redhat, doing nothing') + } + +}