projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
godard: enable persistent journald storage. rt#7049
[mirror/dsa-puppet.git]
/
modules
/
apache2
/
manifests
/
site.pp
diff --git
a/modules/apache2/manifests/site.pp
b/modules/apache2/manifests/site.pp
index
4588a60
..
6d5ec55
100644
(file)
--- a/
modules/apache2/manifests/site.pp
+++ b/
modules/apache2/manifests/site.pp
@@
-35,27
+35,38
@@
define apache2::site (
ensure => $ensure,
content => $content,
require => Package['apache2'],
ensure => $ensure,
content => $content,
require => Package['apache2'],
- notify =>
Service['apache2
'],
+ notify =>
Exec['service apache2 reload
'],
}
} else {
file { $target:
ensure => $ensure,
source => $source,
require => Package['apache2'],
}
} else {
file { $target:
ensure => $ensure,
source => $source,
require => Package['apache2'],
- notify =>
Service['apache2
'],
+ notify =>
Exec['service apache2 reload
'],
}
}
}
}
- if $ensure == present {
+ if versioncmp($::lsbmajdistrelease, '7') <= 0 {
+ $symlink = "/etc/apache2/sites-enabled/${name}"
+ } else {
+ $symlink = "/etc/apache2/sites-enabled/${name}.conf"
+
file { "/etc/apache2/sites-enabled/${name}":
file { "/etc/apache2/sites-enabled/${name}":
+ ensure => absent,
+ notify => Exec['service apache2 reload'],
+ }
+ }
+
+ if $ensure == present {
+ file { $symlink:
ensure => link,
target => $link_target,
ensure => link,
target => $link_target,
- notify
=> Service['apache2
'],
+ notify
=> Exec['service apache2 reload
'],
}
} else {
}
} else {
- file {
"/etc/apache2/sites-enabled/${name}"
:
+ file {
$symlink
:
ensure => absent,
ensure => absent,
- notify
=> Service['apache2
'],
+ notify
=> Exec['service apache2 reload
'],
}
}
}
}
}
}