summaryrefslogtreecommitdiff
path: root/puppet/modules/apache/manifests/module.pp
blob: cbcf2d04989d1a983f8844a8455a4537307e6993 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
define apache::module (
  $ensure = present, $source = '',
  $destination = '', $module = '', $package_name = 'absent',
  $conf_content = '', $conf_source = '',
) {

  $real_module = $module ? {
    '' => $name,
    default => $module,
  }

  case $operatingsystem {
    'centos': {
      apache::centos::module { "$real_module":
        ensure => $ensure, source => $source,
        destination => $destination
      }
    }
    'gentoo': {
      apache::gentoo::module { "$real_module":
        ensure => $ensure, source => $source,
        destination => $destination
      }
    }
    'debian','ubuntu': {
      apache::debian::module { "$real_module":
        ensure => $ensure, package_name => $package_name,
        conf_content => $conf_content, conf_source => $conf_source
      }
    }
    default: {
      err('Your operating system does not have a module deployment mechanism defined')
    }
  }
}