summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2013-10-21 18:35:01 +0200
committervarac <varacanero@zeromail.org>2013-10-21 18:35:01 +0200
commit1103a73ab4253712c6446bba7a443619fe516717 (patch)
tree70906a22a098c68a9f2b0a1408acfb7051974805
parent25b1de206454c663539b748fb9f08276ad95b3e4 (diff)
cannot reassign variable valid_fqdn (Bug #4125)
Omitting the parameter "valid_fqdn" for postfix::satellite won't work, even if the machine has a fqdn: Cannot reassign variable valid_fqdn at /srv/leap/puppet/modules/postfix/manifests/satellite.pp:32 this will fix it, it does: * make the string in /etc/mailname configurable, defaults to $::fqdn * postfix::satellite's parameter valid_fqdn is passed to class postfix's parameter "myorigin" and "mailname" see https://leap.se/code/issues/4125 for more information.
-rw-r--r--manifests/init.pp3
-rw-r--r--manifests/satellite.pp12
2 files changed, 6 insertions, 9 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 11f6681..77d26ba 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -53,6 +53,7 @@ class postfix(
$mastercf_tail = "",
$inet_interfaces = 'all',
$myorigin = $::fqdn,
+ $mailname = $::fqdn,
$preseed = false
) {
@@ -124,7 +125,7 @@ class postfix(
file { "/etc/mailname":
ensure => present,
- content => "${fqdn}\n",
+ content => "${mailname}\n",
seltype => $postfix_seltype,
}
diff --git a/manifests/satellite.pp b/manifests/satellite.pp
index 739c625..da818a5 100644
--- a/manifests/satellite.pp
+++ b/manifests/satellite.pp
@@ -21,20 +21,16 @@
# }
# }
#
-class postfix::satellite(
+class postfix::satellite (
$relayhost = '',
- $valid_fqdn = '',
+ $valid_fqdn = $::fqdn,
$root_mail_recipient = ''
) {
- # If $valid_fqdn exists, use it to override $fqdn
- case $valid_fqdn {
- "": { $valid_fqdn = $::fqdn }
- default: { $fqdn = "${valid_fqdn}" }
- }
-
class { 'postfix':
root_mail_recipient => $root_mail_recipient,
+ myorigin => $valid_fqdn,
+ mailname => $valid_fqdn
}
class { 'postfix::mta':