diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-01-21 18:01:00 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-01-21 18:01:00 -0200 |
commit | 86515e9a0f27d36e38faee05beb03cbb99677e73 (patch) | |
tree | 355b620ee9ea98be6d54f87c506b64b2024c8076 /manifests/system.pp | |
parent | 14d954ff02564493192fe1fc9ad3a148ba20ef60 (diff) | |
download | puppet-mail-86515e9a0f27d36e38faee05beb03cbb99677e73.tar.gz puppet-mail-86515e9a0f27d36e38faee05beb03cbb99677e73.tar.bz2 |
Refactoring for 2.7 compatibility
Diffstat (limited to 'manifests/system.pp')
-rw-r--r-- | manifests/system.pp | 44 |
1 files changed, 15 insertions, 29 deletions
diff --git a/manifests/system.pp b/manifests/system.pp index 42444ca..8106b2b 100644 --- a/manifests/system.pp +++ b/manifests/system.pp @@ -13,10 +13,7 @@ class mail::system { $postfix_manage_virtual_regexp = "yes" $postfix_mydestination = '$myhostname, localhost.$mydomain, localhost' $postfix_default_relay_domains = '$mydestination' - - case $postfix_mynetworks { - '': { $postfix_mynetworks = "127.0.0.0/8" } - } + $postfix_mynetworks = hiera('postfix_mynetworks', "127.0.0.0/8") case $sympa_subdomain { '': { $sympa_subdomain = "lists" } @@ -35,7 +32,7 @@ class mail::system { include mail::spamassassin # Virtual mail system - case $mail_virtual { + case hiera('mail_virtual', true) { true: { include mail::virtual } @@ -45,10 +42,10 @@ class mail::system { } # Sympa mailing list manager - case $mail_sympa { + case hiera('mail_sympa', false) { true: { - $sympa_relay_domains = ", ${sympa_subdomain}.${domain}" include mail::sympa + $sympa_relay_domains = ", ${mail::sympa::subdomain}.${domain}" } 'disabled': { include mail::sympa::disabled @@ -58,41 +55,30 @@ class mail::system { } # Schleuder mailing list manager - case $mail_schleuder { + case hiera('mail_schleuder', false) { true: { - case $schleuder_subdomain { - '': { $schleuder_subdomain = "encrypted" } - } - - $schleuder_relay_domains = ", ${schleuder_subdomain}.${domain}" - include mail::schleuder + class { 'mail::schleuder: } + $schleuder_relay_domains = ", ${mail::schleuder::subdomain}.${domain}" } } # Mlmmj - case $mail_mlmmj { - true: { - case $mlmmj_subdomain { - '': { $mlmmj_subdomain = "mlmmj" } - } - - $mlmmj_relay_domains = ", ${mlmmj_subdomain}.${domain}" - include mail::mlmmj + case hiera('mail_mlmmj', false) { + class { 'mail::mlmmj': } + $mlmmj_relay_domains = ", ${mail::mlmmj::subdomain}.${domain}" } } # Firma - case $mail_firma { + case hiera('mail_firma', false) { true: { - case $firma_subdomain { - '': { $firma_subdomain = "firma" } - } - - $firma_relay_domains = ", ${firma_subdomain}.${domain}" - include mail::firma + class { 'mail::firma': } + $firma_relay_domains = ", ${mail::firma::subdomain}.${domain}" } } + $postfix_relay_domains = hiera('postfix_relay_domains', '') + case $postfix_relay_domains { '': { $postfix_relay_domains = "${postfix_default_relay_domains}${sympa_relay_domains}${schleuder_relay_domains}${mlmmj_relay_domains}${firma_relay_domains}" } } |