summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2015-06-05 15:43:18 -0300
committerdrebs <drebs@riseup.net>2015-06-05 15:43:18 -0300
commit2c32f1c0cfe326bf888b49091242aa57b8ad6f87 (patch)
treefdb82146dd76a449a32cd8a2d620d078466fc56f
parentafd1a163473f25244afc667313dbdee95fb8b4de (diff)
downloadpuppet-apache-2c32f1c0cfe326bf888b49091242aa57b8ad6f87.tar.gz
puppet-apache-2c32f1c0cfe326bf888b49091242aa57b8ad6f87.tar.bz2
add '.conf' in site conf file names
-rw-r--r--manifests/site.pp14
1 files changed, 7 insertions, 7 deletions
diff --git a/manifests/site.pp b/manifests/site.pp
index cda1662..c4daa6b 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -115,7 +115,7 @@ define apache::site(
case $source {
true: {
- file { "${apache::sites}-available/$vhost":
+ file { "${apache::sites}-available/$vhost.conf":
ensure => $ensure,
source => [ "puppet:///modules/site_apache/vhosts/$domain/$title",
"puppet:///modules/site_apache/vhosts/$title" ],
@@ -127,7 +127,7 @@ define apache::site(
}
}
false: {
- file { "${apache::sites}-available/$vhost":
+ file { "${apache::sites}-available/$vhost.conf":
ensure => $ensure,
content => template("$template"),
owner => root,
@@ -177,19 +177,19 @@ define apache::site(
}
}
exec { "/usr/sbin/a2ensite $vhost":
- unless => "/bin/sh -c '[ -L ${apache::sites}-enabled/$vhost ] \
- && [ ${apache::sites}-enabled/$vhost -ef ${apache::sites}-available/$vhost ]'",
+ unless => "/bin/sh -c '[ -L ${apache::sites}-enabled/$vhost.conf ] \
+ && [ ${apache::sites}-enabled/$vhost.conf -ef ${apache::sites}-available/$vhost.conf ]'",
notify => Exec["reload-apache2"],
}
}
'absent': {
exec { "/usr/sbin/a2dissite $vhost":
- onlyif => "/bin/sh -c '[ -L ${apache::sites}-enabled/$vhost ] \
- && [ ${apache::sites}-enabled/$vhost -ef ${apache::sites}-available/$vhost ]'",
+ onlyif => "/bin/sh -c '[ -L ${apache::sites}-enabled/$vhost.conf ] \
+ && [ ${apache::sites}-enabled/$vhost.conf -ef ${apache::sites}-available/$vhost.conf ]'",
notify => Exec["reload-apache2"],
}
- file { "${apache::sites}-enabled/$vhost":
+ file { "${apache::sites}-enabled/$vhost.conf":
ensure => absent,
notify => Exec["reload-apache2"],
}