diff options
-rw-r--r-- | manifests/config.pp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/manifests/config.pp b/manifests/config.pp new file mode 100644 index 0000000..acfa305 --- /dev/null +++ b/manifests/config.pp @@ -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'], + } +} |