summaryrefslogtreecommitdiff
path: root/manifests/config.pp
blob: acfa305e1c9f00c16d4825b02eda8a50c7c50ec9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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'],
  }
}