Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion modules/enableit/common/data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ common::system::classes:
- common::system::hosts
- common::system::kernel
- common::system::limits
- common::system::mail
- common::system::nscd
- common::system::nsswitch
- common::system::obmondo_admin
Expand Down
6 changes: 4 additions & 2 deletions modules/enableit/common/manifests/system.pp
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,10 @@
include $subclass
}

# Only manage mail if not using a role that provides it
if $::obmondo_classes.grep('::mailcow').empty {
# Only manage mail if no role::mail::* subrole provides it. Those subroles
# (mailcow, postfix, smtprelay) declare common::system::mail themselves, so
# containing it here too would be a duplicate declaration.
if $::obmondo_classes.grep('role::mail::').empty {
contain common::system::mail
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/enableit/role/manifests/mail/smtprelay.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
Boolean $manage = false,
Optional[Eit_types::Host] $relayhost = undef,
Array[Variant[Eit_types::IP, Eit_types::IPCIDR]] $allowed_networks = [],
) {
) inherits ::role::mail {
# Always trust loopback so locally-generated mail relays, then the
# operator-supplied client networks.
$mynetworks = ['127.0.0.0/8', '[::1]/128'] + $allowed_networks
Expand Down