summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-04-12 14:57:18 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-04-12 14:57:18 -0300
commit69fa0b5402afc664c6c80994753b19f432c8159b (patch)
treea9fe112c632af1e3be05a27081fe02dd4a77e2b5
parent911dc5b37a55ce89f4deca57f5c4084e045dab79 (diff)
downloadpuppet-apache-69fa0b5402afc664c6c80994753b19f432c8159b.tar.gz
puppet-apache-69fa0b5402afc664c6c80994753b19f432c8159b.tar.bz2
Adds apache::config
-rw-r--r--manifests/config.pp23
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'],
+ }
+}