diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2020-05-07 20:57:53 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2020-05-07 20:57:53 -0300 |
commit | 6f215690167ce4c23005feec574c91a8db1ae999 (patch) | |
tree | 4e048d2f7ad30b279acda7d500352457ebfed261 /manifests/system.pp | |
parent | 826b93e4be39b91a44039debd36083096bd3f02d (diff) | |
download | puppet-mail-6f215690167ce4c23005feec574c91a8db1ae999.tar.gz puppet-mail-6f215690167ce4c23005feec574c91a8db1ae999.tar.bz2 |
Hiera 5 migration
Diffstat (limited to 'manifests/system.pp')
-rw-r--r-- | manifests/system.pp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/manifests/system.pp b/manifests/system.pp index 95179ee..909f4b5 100644 --- a/manifests/system.pp +++ b/manifests/system.pp @@ -1,8 +1,8 @@ class mail::system( - $mydestination = hiera('mail::mydestination', '$myhostname, localhost.$mydomain, localhost'), - $relay_domains = hiera('mail::relay_domains', ''), - $mynetworks = hiera('mail::postfix_mynetworks', "127.0.0.0/8"), - $root_mail_recipient = hiera('mail::root_mail_recipient', 'nobody') + $mydestination = lookup('mail::mydestination', undef, undef, '$myhostname, localhost.$mydomain, localhost'), + $relay_domains = lookup('mail::relay_domains', undef, undef, ''), + $mynetworks = lookup('mail::postfix_mynetworks', undef, undef, "127.0.0.0/8"), + $root_mail_recipient = lookup('mail::root_mail_recipient', undef, undef, 'nobody') ) { # Base postfix class @@ -11,19 +11,19 @@ class mail::system( smtp_listen => "all", use_amavisd => "yes", use_dovecot_lda => "yes", - use_schleuder => hiera('mail::schleuder', false) ? { + use_schleuder => lookup('mail::schleuder', undef, undef, false) ? { true => "yes", default => "no", }, - use_sympa => hiera('mail::sympa', false) ? { + use_sympa => lookup('mail::sympa', undef, undef, false) ? { true => "yes", default => "no", }, - use_mlmmj => hiera('mail::mlmmj', false) ? { + use_mlmmj => lookup('mail::mlmmj', undef, undef, false) ? { true => "yes", default => "no", }, - use_firma => hiera('mail::firma', false) ? { + use_firma => lookup('mail::firma', undef, undef, false) ? { true => "yes", default => "no", }, @@ -33,7 +33,7 @@ class mail::system( manage_transport_regexp => "yes", manage_virtual_regexp => "yes", manage_header_checks => "yes", - manage_tls_policy => hiera('mail::postfix_manage_tls_policy', 'no') + manage_tls_policy => lookup('mail::postfix_manage_tls_policy', undef, undef, 'no') } # Log rotation @@ -69,7 +69,7 @@ class mail::system( include mail::virtual::web::params # Virtual mail system - case hiera('mail::virtual', false) { + case lookup('mail::virtual', undef, undef, false) { true: { class { 'mail::virtual': } } @@ -79,7 +79,7 @@ class mail::system( } # Sympa mailing list manager - case hiera('mail::sympa', false) { + case lookup('mail::sympa', undef, undef, false) { true: { class { 'mail::sympa': } $sympa_relay_domains = ", ${mail::sympa::subdomain}.${domain}" @@ -94,7 +94,7 @@ class mail::system( } # Schleuder mailing list manager - case hiera('mail::schleuder', false) { + case lookup('mail::schleuder', undef, undef, false) { true: { class { 'mail::schleuder': } $schleuder_relay_domains = ", ${mail::schleuder::subdomain}.${domain}" @@ -105,7 +105,7 @@ class mail::system( } # Mlmmj - case hiera('mail::mlmmj', false) { + case lookup('mail::mlmmj', undef, undef, false) { true: { class { 'mail::mlmmj': } @@ -117,7 +117,7 @@ class mail::system( } # Firma - case hiera('mail::firma', false) { + case lookup('mail::firma', undef, undef, false) { true: { class { 'mail::firma': } $firma_relay_domains = ", ${mail::firma::subdomain}.${domain}" @@ -128,7 +128,7 @@ class mail::system( } # GPG Mail Gateway - case hiera('mail::gpg_mailgate', false) { + case lookup('mail::gpg_mailgate', undef, undef, false) { true: { class { 'mail::gpg_mailgate': } } |