summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2011-09-22 14:51:53 -0400
committerMicah Anderson <micah@riseup.net>2011-09-22 14:51:53 -0400
commit9b10a1e8e73863e428601e21c94b3ef664d1eaa7 (patch)
treea435d442171c711f82dfac0b4856cb09b78f4860
parent122d707683b686b6370c2a9f1cf0d86edd613c34 (diff)
setup debian location for sieve scripts
-rw-r--r--manifests/sieve.pp19
1 files changed, 12 insertions, 7 deletions
diff --git a/manifests/sieve.pp b/manifests/sieve.pp
index 81f2a1a..aa7fc3a 100644
--- a/manifests/sieve.pp
+++ b/manifests/sieve.pp
@@ -7,12 +7,17 @@ class dovecot::sieve {
before => Service['dovecot'],
}
+ $sieve_location = $operatingsystem ? {
+ debian => '/var/lib/dovecot/sieve',
+ default => '/var/lib/dovecot-sieve'
+ }
+
file {
- '/var/lib/dovecot-sieve':
+ $sieve_location:
ensure => directory,
owner => root, group => 0, mode => 0644;
- '/var/lib/dovecot-sieve/global':
+ "${sieve_location}/global":
ensure => directory,
recurse => true,
purge => true,
@@ -20,7 +25,7 @@ class dovecot::sieve {
notify => Exec['compile_global_sieve'],
owner => root, group => root, mode => 0644;
- '/var/lib/dovecot-sieve/default.sieve':
+ "${sieve_location}/default.sieve":
source => [ "puppet:///modules/site-dovecot/sieve/${fqdn}/default.sieve",
"puppet:///modules/site-dovecot/sieve/default.sieve",
"puppet:///modules/dovecot/sieve/${operatingsystem}/default.sieve",
@@ -31,12 +36,12 @@ class dovecot::sieve {
exec {
'compile_default_sieve':
- command => 'sievec /var/lib/dovecot-sieve/default.sieve',
- creates => '/var/lib/dovecot-sieve/default.svbin',
- require => File['/var/lib/dovecot-sieve/default.sieve'];
+ command => "sievec ${sieve_location}/default.sieve",
+ creates => "${sieve_location}/default.svbin",
+ require => File["${sieve_location}/default.sieve"];
'compile_global_sieve':
- command => 'sievec /var/lib/dovecot-sieve/global/',
+ command => "sievec ${sieve_location}/global/",
refreshonly => true;
}
}