From 69fa0b5402afc664c6c80994753b19f432c8159b Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 12 Apr 2018 14:57:18 -0300 Subject: Adds apache::config --- manifests/config.pp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 manifests/config.pp 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'], + } +} -- cgit v1.2.3