# Enable the site without a2ensite
#
#$status = $ensure ? {
- # 'present' => "${apache::sites}-available/$vhost",
+ # 'present' => "${apache::sites}-available/$vhost.conf",
# default => 'absent',
#}
#
- #file { "/etc/apache2/sites-enabled/$title":
+ #file { "/etc/apache2/sites-enabled/$vhost.conf":
# ensure => $status,
# owner => root,
# group => root,
}
}
exec { "/usr/sbin/a2ensite $vhost":
+ command => $::lsbdistcodename ? {
+ 'wheezy' => "/usr/sbin/a2ensite $vhost.conf",
+ default => "/usr/sbin/a2ensite $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":
+ command => $::lsbdistcodename ? {
+ 'wheezy' => "/usr/sbin/a2dissite $vhost.conf",
+ default => "/usr/sbin/a2dissite $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"],